Configuration
apiki can be customized through command-line flags and environment variables.
Variables File Location
Your saved variables are stored in a file. By default, this is ~/.apiki/variables.json.
You can change the location:
With a flag:
apiki --variables-file /path/to/my-variables.json
apiki -f /path/to/my-variables.jsonWith an environment variable:
export APIKI_FILE=/path/to/my-variables.json
apikiThe flag takes precedence over the environment variable.
Installation Directory
The installation directory contains the apiki binary and shell init scripts. By default:
- Linux/macOS:
~/.local/share/apiki - If
XDG_DATA_HOMEis set:$XDG_DATA_HOME/apiki
To install to a custom location, set APIKI_DIR before running the install script:
export APIKI_DIR="$HOME/custom/path"
curl -fsSL https://raw.githubusercontent.com/loderunner/apiki/main/scripts/install.sh | bashCommand-Line Options
| Option | Description |
|---|---|
--variables-file, -f | Path to variables file |
Environment Variables
| Variable | Description | Default |
|---|---|---|
APIKI_FILE | Path to variables file | ~/.apiki/variables.json |
APIKI_DIR | Installation directory | ~/.local/share/apiki |
Multiple Configurations
You can maintain separate variable files for different contexts:
# Work projects
apiki -f ~/.apiki/work.json
# Personal projects
apiki -f ~/.apiki/personal.jsonOr set up shell aliases:
alias apiki-work='apiki -f ~/.apiki/work.json'
alias apiki-personal='apiki -f ~/.apiki/personal.json'Troubleshooting
Shell Integration Not Working
- Check that
APIKI_DIRis set:echo $APIKI_DIR - Verify the init script exists:
ls "$APIKI_DIR/init.bash"(or.zsh,.fish) - Ensure your shell config sources it
- Restart your terminal or run
source ~/.bashrc(or equivalent)
Permission Errors
Make sure you have read/write access to:
- The directory containing your variables file
- The variables file itself
Command Not Found
If apiki isn’t recognized:
- Check that the binary is in your PATH, or
- Source your shell configuration:
source ~/.bashrc