README: add dfi alias

- `dfi` is now primary unified command (saves fingers)
  * `docker-finance` is still available, as this is only an addition
This commit is contained in:
2024-08-05 19:28:53 -07:00
parent b692a6145f
commit 3230a5b63d

View File

@@ -243,8 +243,6 @@ Supported blockchains (independent of wallet type):
### Installation
[//]: # (TODO: add `dfi` aliases, update README)
`docker-finance` is not your typical Docker image in which you simply pull and containerize, but rather it's an *image-based* accounting system that operates transparently between your client (host) and container; keeping your finances containerized, with all the benefits of containerization.
`docker-finance` *should* work out-of-the-box on any modern Linux system. For example, if your client (host) is Ubuntu, the default installation of `coreutils`, `shells` and `utils` that came with your system will satisfy requirements. However, you'll still need to manually install Docker (see below).
@@ -307,31 +305,35 @@ Supported blockchains (independent of wallet type):
5. **Prepare your shell environment**:
This will install convenience aliases and command completion to your shell environment (see [install.bash](client/install.bash) for details).
The following install convenience aliases and command completion to your shell environment (see [install.bash](client/install.bash) for details).
```bash
./docker-finance/client/install.bash && source ~/.bashrc
```
- After your first image is built (step 7), you can use commandline completion for all `docker-finance` images and image-based commands
- The `dfi` alias of `docker-finance` is the recommended alias to use for for all client/container operations
6. **Generate client/container environment**:
This will generate your Docker-related client/container environment (see [Environment Generation](#environment-generation) for details).
The following will generate your Docker-related client/container environment for the default image (see [Environment Generation](#environment-generation) for details):
```bash
docker-finance archlinux/${USER}:default gen
dfi archlinux/${USER}:default gen
```
> If you would like to use the `ubuntu` image, replace `archlinux` with `ubuntu` here and for all remaining steps
7. **Build default `docker-finance` image**:
```bash
docker-finance archlinux/${USER}:default build type=default
dfi archlinux/${USER}:default build type=default
```
> See `docker-finance archlinux/${USER}:default build help` for build options (such as smaller, faster builds)
> Use the `build help` command for available options (such as smaller, faster builds)
8. **Bring up container of default `docker-finance` image**:
```bash
docker-finance archlinux/${USER}:default up
dfi archlinux/${USER}:default up
```
> You can use tab completion for all commands available to this built image
> You can use tab completion for all `dfi <platform/user:tag>` commands (but only for built images). See `dfi help` for commands.
9. **You're inside!** See [How do I use it?](#how-do-i-use-it) for next steps.
@@ -381,6 +383,9 @@ Although the container environment is a minimum requirement, here you'll have th
If you're a developer or wish to see the mockup test profile, select 'y' here.
It should be noted that:
- mockup data can be found in the `mockup` directories within this repository
> *Enter profile name (e.g., family in 'family/alice')*
> *Enter subprofile name (e.g., alice in 'family/alice')*
@@ -475,7 +480,7 @@ The bind-mount is used exclusively for non-essential file sharing (custom script
The container's `finance` command (useful for experimental implementations).
Default: `finance.bash` (internally aliased to `finance`)
Default: `finance.bash` (internally aliased to `finance` and `dfi`)
- Example: `DOCKER_FINANCE_CONTAINER_CMD=finance.bash`
@@ -622,7 +627,7 @@ See the in-file comments for further documentation:
- [subprofile.bash.in](client/docker-finance.d/container/shell/subprofile.bash.in)
After `gen` is complete, from within the container, you can edit this file with: `finance profile/subprofile edit type=shell` (see [Container Command Format](#container-command-format)).
After `gen` is complete, from within the container, you can edit this file with: `dfi profile/subprofile edit type=shell` (see [Container Command Format](#container-command-format)).
##### *Fetch*
@@ -632,7 +637,7 @@ See the in-file comments for further documentation:
- [fetch.yaml.in](client/docker-finance.d/container/fetch/fetch.yaml.in)
After `gen` is complete, from within the container, you can edit this file with: `finance profile/subprofile edit type=fetch` (see [Container Command Format](#container-command-format)).
After `gen` is complete, from within the container, you can edit this file with: `dfi profile/subprofile edit type=fetch` (see [Container Command Format](#container-command-format)).
##### *Meta*
@@ -642,7 +647,7 @@ See the in-file comments for further documentation:
- [meta.csv.in](client/docker-finance.d/container/meta/meta.csv.in)
After `gen` is complete, from within the container, you can edit this file with: `finance profile/subprofile edit type=meta` (see [Container Command Format](#container-command-format)).
After `gen` is complete, from within the container, you can edit this file with: `dfi profile/subprofile edit type=meta` (see [Container Command Format](#container-command-format)).
## How do I use it?
@@ -657,11 +662,12 @@ These two scripts can be rationalized by the following format:
<script> <super/sub> <command> [args]
> Note: for your convenience, command arguments [args] can be arranged in any order.
For example, these [Screenshots](#screenshots) describe a setup with mockup data where the client (host) user named `personal`, along with container `$DOCKER_FINANCE_USER` named `personal`, engage in client/container activity. The container profile named `testprofile` and its subprofile named `testuser` can be described as `<super/sub>` portion of the format (`testprofile/testuser`).
> Note: mockup data can be found in the `mockup` directories within this repository.
It should be noted that, for your convenience:
- command arguments [args] can be arranged in any order
- commandline completion is available for all `<super/sub> command [args]` (so, save your fingers and tab away)
- NOTE: for client, an image must first be built
---
@@ -681,22 +687,18 @@ Where:
- `<command>` is the command to pass to `docker.bash`
- `[args]` are the (optional) arguments to pass to `<command>`
For a complete list of commands and usage help:
If the [Installation](#installation) was successful, `docker.bash` is aliased to `docker-finance` and `dfi` (so, either can be used).
For a complete list of commands and usage help (`<platform/user:tag>` *not* required):
```bash
${DOCKER_FINANCE_CLIENT_REPO}/client/docker.bash archlinux/${USER}:default help
dfi help
```
Or, if the [Installation](#installation) alias was properly created:
To view the help usage of a specific command, for example; the `edit` command (`<platform/user:tag>` *is* required):
```bash
docker-finance archlinux/${USER}:default help
```
You can also view the help usage of, for example, the `edit` command:
```bash
docker-finance archlinux/${USER}:default edit help
dfi archlinux/${USER}:default edit help
```
---
@@ -716,20 +718,20 @@ Where:
- `<command>` is the command to pass to `finance.bash`
- `[args]` are the (optional) arguments to pass to `<command>`
By default, `finance.bash` is aliased to `finance` (so, either can be used).
By default, `finance.bash` is aliased to `finance` and `dfi` (so, either can be used).
For a complete list of commands (no `<profile/subprofile>` needed):
For a complete list of commands (`<profile/subprofile>` *not* required):
```bash
finance help
dfi help
```
You can also view the help usage of, for example, the `fetch` command (notice the need for `<profile/subprofile>`).
To view the help usage of a specific command, for example; the `fetch` command (`<profile/subprofile>` *is* required):
Assuming `<profile/subprofile>` is `testprofile/testuser`:
```bash
finance testprofile/testuser fetch help
dfi testprofile/testuser fetch help
```
Or, use a subprofile alias, as described in [Subprofile](#subprofile):
@@ -738,8 +740,6 @@ Or, use a subprofile alias, as described in [Subprofile](#subprofile):
testuser_fetch help
```
> Note: the `finance` alias is named to avoid confusion with the client (host) command `docker-finance`, but you can still use the alias `docker-finance` *within* the container in place of all `finance` commands.
### Flow Layout
A primary read through of [hledger](https://hledger.org) and [hledger-flow](https://github.com/apauley/hledger-flow/blob/master/README.org) documentation should bring you up to speed on the essentials.