A command-line interface for managing Outline servers. This CLI allows you to store and manage multiple Outline server configurations locally and perform basic operations on them.
Inspired by https://github.com/JMCFTW/outline-cli/
Motivation: the official outline Electron app is unreliable.
git clone github.com/art-shutter/outline-cli
cd outline-cli
just buildnix shell 'github:art-shutter/outline-cli/main#outline-cli'There are pre-built binaries for macos and linux attached to releases. Just download and run them, or use a tool like bin to do that for you.
The CLI stores configuration in ~/.config/outline-cli/config.yaml. The configuration file is automatically created when you add your first server.
Security Note: The CLI requires the certificate SHA256 hash for each server to verify the server's identity. This prevents man-in-the-middle attacks by ensuring you're connecting to the correct server.
Example configuration:
servers:
my-server:
name: my-server
url: https://myserver.com/SecretPath
certSha256: 34B3C8EB1C6EC9B5335556D7E8DC73A30152D27C66B054BAB8ACF5D11AE0C810
production:
name: production
url: https://prod-server.com/AnotherSecretPath
certSha256: 1234567890ABCDEF1234567890ABCDEF1234567890ABCDEF1234567890ABCDEFoutline-cli servers listoutline-cli servers add <server-name> <server-url> --cert-sha256 <certificate-hash>Example:
outline-cli servers add my-server https://myserver.com/SecretPath --cert-sha256 34B3C8EB1C6EC9B5335556D7E8DC73A30152D27C66B054BAB8ACF5D11AE0C810outline-cli servers add <server-name> --json '{"apiUrl": "https://server.com:port/path", "certSha256": "certificate-hash"}'Example:
outline-cli servers add production --json '{"apiUrl": "https://vpn.drunkcoding.net:60000/b782eecb-bb9e-58be-614a-d5de1431d6b3", "certSha256": "34B3C8EB1C6EC9B5335556D7E8DC73A30152D27C66B054BAB8ACF5D11AE0C810"}'outline-cli servers get <server-name>outline-cli servers update <server-name> --url <new-url>outline-cli servers delete <server-name>outline-cli servers keys list <server-name>outline-cli servers keys create <server-name> [--name <key-name>] [--method <encryption-method>] [--port <port>] [--data-limit <size>]Example:
outline-cli servers keys create my-server --name "My Key" --method aes-192-gcm --port 12345Example with data limit (1GB):
outline-cli servers keys create my-server --name "Limited Key" --data-limit 1GB
# supports human-readable sizes like `1GB`, `500MB`, `2TB`, `1.5GB`, etc.outline-cli servers keys edit <server-name> [--key-id <key-id> | --key-name <key-name>] [--new-name <new-name>] [--data-limit <size>] [--remove-limit]Examples:
# Rename a key by ID
outline-cli servers keys edit my-server --key-id "1" --new-name "Updated Key"
# Change data limit by name
outline-cli servers keys edit my-server --key-name "My Key" --data-limit 2GB
# Remove data limit
outline-cli servers keys edit my-server --key-name "My Key" --remove-limit
# Rename and set new limit
outline-cli servers keys edit my-server --key-name "Old Name" --new-name "New Name" --data-limit 1.5GBoutline-cli servers keys delete <server-name> --key-id <key-id>Or delete by name:
outline-cli servers keys delete <server-name> --key-name <key-name>Note: Key ID and Key Name are different:
- Key ID: A unique identifier assigned by the server (e.g., "1", "2", "abc123")
- Key Name: A human-readable name you assigned when creating the key (e.g., "My Key", "Production Key")
outline-cli servers metrics <server-name>Get help for any command:
outline-cli --help
outline-cli servers --help
outline-cli servers add --helpjust buildor
nix buildjust lint
just test- Get a machine outside of firewall (VMs, VPS, etc.)
- Install outline using official script (read the script before running)
- Add the server to
outline-cliusing json key from the script - Generate keys for your clients
- ???
- PROFIT
This project is licensed under the MIT License. The author is not affiliated with Jigsaw or Google, all respective trademarks are reserved.
Contributions are welcome! Please feel free to submit a Pull Request.