nippo-cli

The tool to power my nippo.
Install nippo command
go install github.com/c18t/nippo-cli/nippo@latest
Usage
Setup
-
Initialize the configuration:
nippo init
This will prompt you for:
- Google Drive folder URL/ID
- Site URL
- Project URL
- Project branch name
- Template and asset paths
-
Download credentials.json from Google Cloud Console:
- Go to Google Cloud Console
- Create or select a project
- Enable the Google Drive API
- Create OAuth 2.0 credentials (Desktop application)
- Download the credentials and save as
credentials.json in the data directory
-
Authenticate with Google Drive:
nippo auth
-
Check your setup:
nippo doctor
Build
nippo build
Publish
nippo deploy
Configuration
Configuration File
The configuration file is located at:
| Platform |
Path |
| Linux/macOS |
~/.config/nippo/nippo.toml |
| Windows |
%APPDATA%\nippo\nippo.toml |
You can also set XDG_CONFIG_HOME environment variable to customize the location.
Path Configuration
nippo uses XDG Base Directory specification for file locations.
You can customize paths in nippo.toml:
[project]
drive_folder_id = "your-drive-folder-id"
site_url = "https://nippo.example.com"
url = "https://github.com/c18t/nippo"
branch = "main"
template_path = "/templates"
asset_path = "/dist"
[path]
# Uncomment and modify to customize file locations.
# data_dir = "~/.local/share/nippo"
# cache_dir = "~/.cache/nippo"
Default Paths
Data Directory
Files: credentials.json, token.json, templates/, assets/
| Platform |
Default Path |
| Linux/macOS |
$XDG_DATA_HOME/nippo or ~/.local/share/nippo |
| Windows |
%LOCALAPPDATA%\nippo |
Cache Directory
Files: md/, output/, nippo-template.zip
| Platform |
Default Path |
| Linux/macOS |
$XDG_CACHE_HOME/nippo or ~/.cache/nippo |
| Windows |
%LOCALAPPDATA%\nippo\cache |
Example: Custom Paths
[project]
drive_folder_id = "1HNSRS2tJI2t7DKP_8XQJ2NTleSH-rs4y"
site_url = "https://nippo.c18t.me"
url = "https://github.com/c18t/nippo"
branch = "main"
template_path = "/templates"
asset_path = "/dist"
[path]
# Store data in a custom location
data_dir = "/opt/nippo/data"
cache_dir = "/var/cache/nippo"
You can also use:
- Environment variables:
$HOME/nippo-data or %USERPROFILE%\nippo-data
- Tilde expansion:
~/nippo-data
- Relative paths:
./data (relative to config directory)
Development
Getting Started
Prerequisites
Or some IDE with Dev Containers
support (e.g., Visual Studio Code).
Create Container
Using GitHub Codespaces
- Open this repository in GitHub
- Click "Code" → "Codespaces" → "Create codespace on main"
- Wait for the Codespace to be created and initialized
- Once set up, proceed to the "Setup Container Workspace" section below
Using Dev Containers (Local)
-
Clone the repository:
ghq get c18t/nippo-cli
cd $(ghq root)/github.com/c18t/nippo-cli
-
Add GH_TOKEN to .env (if necessary):
cp .env.sample .env
gh auth token | xargs -I {} echo "GH_TOKEN="{} >> .env
-
Open the project in Dev Containers:
code .
Ctrl + Shift + P
>Dev Containers: Reopen in Container
Setup Container Workspace
-
Run setup tasks:
post-create.sh
-
Build and run the application:
mise run build
./bin/nippo
-
[extra] Install extensions recommended for the workspace:
Ctrl + Shift + P
>Extensions: Show Recommended Extensions
- Click
install button
Available Task Runner Commands
mise run <task name>
$ mise tasks
Name Description
build Build the CLI application
dev-up:ccmanager-worktree-settings Set up ccmanager worktree auto-directory settings
dev-up:claude-code-skip-permissions Set up claude code to skip permissions
dev-up:claude-code-stop-autoupdates Set up claude code to disable auto-updates
devcontainer-up Start devcontainer and run ccmanager with Claude Code
release Build release binaries
setup Set up (Runs all `setup:*` tasks)
setup:claude-mcp Set up Claude Code MCP servers
setup:go-mod Install go modules with go.mod
setup:ignore-workspace-file-changes Ignore local changes to workspace file
setup:mise Install dev dependencies with mise
setup:pnpm Set up pnpm packages
setup:pre-commit Set up pre-commit hooks
See Also: c18t/boilerplate-go-cli
License
MIT
Author
ɯ̹t͡ɕʲi