Back to Home

Command Reference

Complete guide to all Fukura CLI commands with detailed options and examples

Table of Contents

Basic Commands

  • fuku init
  • fuku add

Search & View

  • fuku search
  • fuku view
  • fuku open

Server & API

  • fuku serve

Storage & Optimization

  • fuku gc

Remote Sync

  • fuku push
  • fuku pull
  • fuku sync

Configuration

  • fuku config remote
  • fuku config redact

Daemon & Monitoring

  • fuku daemon
  • fuku hook

Global Options

These options can be used with any command:

--repo <PATH>Path to the repository root (defaults to current directory)
--quietSuppress celebratory output
--versionDisplay version information
--helpDisplay help information

Basic Commands

fuku init

Initialize a new Fukura repository in a directory

Usage

fuku init [PATH] [OPTIONS]

Options

--forceReinitialize existing repository
--no-daemonSkip daemon setup
--no-hooksSkip shell hooks installation

Examples

Initialize in current directory
fuku init
Initialize in specific directory
fuku init ~/projects/myapp
Initialize without daemon
fuku init --no-daemon
Reinitialize existing repository
fuku init --force

What It Does

  • Creates .fukura directory structure
  • Sets up configuration files
  • Initializes search index
  • Optionally starts error capture daemon
  • Installs shell hooks for automatic error detection

fuku add

Add a new note to the repository

Usage

fuku add [OPTIONS]

Options

--title <TEXT>Note title
--body <TEXT>Note content
--file <PATH>Read content from file
--stdinRead content from stdin
--tag <TAG>Add tag (can be used multiple times)
--meta <KEY=VALUE>Add metadata (can be used multiple times)
--link <URL>Add link (can be used multiple times)
--privacy <LEVEL>Privacy level: private, org, or public (default: private)
--author <NAME>Author name
--email <EMAIL>Author email
--no-editorSkip editor and use inline input

Examples

Interactive mode (opens editor)
fuku add --title "Fixed CORS issue"
With all options inline
fuku add \
  --title "Redis connection error" \
  --body "Added retry logic with exponential backoff" \
  --tag redis \
  --tag error-handling \
  --meta severity=high \
  --link "https://redis.io/topics/connection-handling" \
  --privacy org
From file
fuku add --title "Deploy script" --file ./deploy.sh
From stdin
echo "Quick note" | fuku add --title "Temp fix" --stdin
Pipe command output
git log --oneline -5 | fuku add --title "Recent commits" --stdin
No editor (inline input)
fuku add --title "Quick note" --no-editor

Search & View

fuku search

Search notes in the repository

Usage

fuku search [QUERY] [OPTIONS]

Options

-n, --limit <N>Maximum number of results (default: 20)
-s, --sort <SORT>Sort by: relevance, updated, or likes (default: relevance)
--jsonOutput as JSON
--tuiInteractive TUI mode
-a, --all-reposSearch across all local repositories

Examples

Basic search
fuku search "database error"
Limit results
fuku search "api" --limit 5
Sort by most recent
fuku search "deployment" --sort updated
Search with multiple terms
fuku search cors nginx api
Interactive TUI mode
fuku search "redis" --tui
Search all repositories
fuku search "kubernetes" --all-repos
JSON output for scripting
fuku search "error" --json | jq '.[].title'

TUI Mode Controls

↑/↓Navigate results
TabSwitch between results and filters
SpaceToggle tag filter
1-4Set time filter (All/7d/30d/90d)
fClear all filters
oOpen note in browser
rRefresh search
q/EscExit TUI

fuku view

View a note&apos;s contents

Usage

fuku view <ID> [OPTIONS]

Options

--jsonOutput as JSON

Examples

View by full ID
fuku view a3f8e9b2c4d5e6f7
View by short ID (first 8 chars)
fuku view a3f8e9b2
View latest note
fuku view @latest
View second most recent note
fuku view @1
JSON output
fuku view @latest --json

fuku open

Open a note in your web browser with rendered HTML

Usage

fuku open <ID> [OPTIONS]

Options

--theme <THEME>Theme: light or dark (default: dark)
--browser-onlyOpen in browser directly (no local server)
--url-onlyShow URL only (don&apos;t open browser)
--server-port <PORT>Local server port (default: 8080)

Examples

Open latest note
fuku open @latest
Open with light theme
fuku open a3f8e9b2 --theme light
Direct browser opening (no server)
fuku open @latest --browser-only
Just show the URL
fuku open a3f8e9b2 --url-only
Custom server port
fuku open @latest --server-port 3000

Features

  • Markdown rendering
  • Syntax highlighting for code blocks
  • Responsive design
  • Light/dark theme support

Server & API

fuku serve

Start a local web server to browse notes via HTTP API

Usage

fuku serve [OPTIONS]

Options

--addr <HOST:PORT>Server address (default: 127.0.0.1:8765)
--page-size <N>Default page size (default: 50)

Examples

Start with defaults
fuku serve
Custom address and port
fuku serve --addr 0.0.0.0:8080
Custom page size
fuku serve --page-size 100
Query from another terminal
curl http://127.0.0.1:8765/notes?q=redis&limit=5
Get specific note
curl http://127.0.0.1:8765/notes/a3f8e9b2
Create note via API
curl -X POST http://127.0.0.1:8765/notes \
  -H "Content-Type: application/json" \
  -d '{"note":{"title":"API test","body":"Created via API","tags":[],"privacy":"private"}}'

API Endpoints

GET/healthzHealth check
GET/notes?q=<query>&limit=<n>&sort=<relevance|updated|likes>List/search notes
GET/notes/:idGet specific note
POST/notesCreate note

Storage & Optimization

fuku gc

Garbage collection: optimize storage by packing loose objects

Usage

fuku gc [OPTIONS]

Options

--pruneRemove loose objects after packing

Examples

Pack loose objects
fuku gc
Pack and prune
fuku gc --prune

Remote Sync

fuku push

Push a note to remote server

Usage

fuku push <ID> [OPTIONS]

Options

--remote <URL>Remote URL (overrides config)

Examples

Push with configured remote
fuku push a3f8e9b2
Push to specific remote
fuku push a3f8e9b2 --remote https://hub.fukura.dev
Push latest note
fuku push @latest

fuku pull

Pull a note from remote server

Usage

fuku pull <ID> [OPTIONS]

Options

--remote <URL>Remote URL (overrides config)

Examples

Pull from configured remote
fuku pull hub-id-12345
Pull from specific remote
fuku pull hub-id-12345 --remote https://hub.fukura.dev

fuku sync

Sync notes with remote server

Usage

fuku sync [ID] [OPTIONS]

Options

--remote <URL>Remote URL (overrides config)
--allSync all private notes
--enable-autoEnable automatic syncing
--disable-autoDisable automatic syncing

Examples

Enable auto-sync
fuku sync --enable-auto
Disable auto-sync
fuku sync --disable-auto
Sync specific note
fuku sync a3f8e9b2
Sync all private notes
fuku sync --all
Sync to specific remote
fuku sync --all --remote https://hub.fukura.dev

Configuration

fuku config remote

Configure remote URL for syncing

Usage

fuku config remote [OPTIONS]

Options

--set <URL>Set remote URL
--clearClear remote URL
--globalApply globally (all projects)

Examples

Set remote for current repository
fuku config remote --set https://hub.fukura.dev
Set global remote (all repositories)
fuku config remote --set https://hub.fukura.dev --global
Clear remote
fuku config remote --clear
Clear global remote
fuku config remote --clear --global

fuku config redact

Manage redaction rules for sensitive data

Usage

fuku config redact [OPTIONS]

Options

--set <NAME=REGEX>Add redaction rule (can be used multiple times)
--unset <NAME>Remove redaction rule (can be used multiple times)

Examples

Add redaction rule for API keys
fuku config redact --set api_key='sk-[a-zA-Z0-9]{32}'
Add multiple rules
fuku config redact \
  --set api_key='sk-[a-zA-Z0-9]{32}' \
  --set password='password=\S+' \
  --set token='token:\s*\S+'
Remove rule
fuku config redact --unset api_key
Remove multiple rules
fuku config redact --unset api_key --unset password

Daemon & Monitoring

fuku daemon

Manage the background daemon for automatic error capture

Usage

fuku daemon [OPTIONS]

Options

--statusShow daemon status and information
--stopStop the daemon
--foregroundRun daemon in foreground (for debugging)

Examples

Start daemon (default)
fuku daemon
Check status
fuku daemon --status
Stop daemon
fuku daemon --stop
Run in foreground (debug mode)
fuku daemon --foreground

What It Does

  • Monitors shell sessions - Tracks command executions
  • Captures errors - Detects non-zero exit codes and stderr output
  • Provides context - Records working directory, git branch, environment
  • Auto-generates notes - Creates notes from error patterns after inactivity
  • Suggests solutions - Searches existing notes for similar errors
  • Respects privacy - All data stored locally unless explicitly synced

fuku hook

Manage shell hooks for automatic error detection

Usage

fuku hook [OPTIONS]

Options

--installInstall hooks
--uninstallUninstall hooks
--statusCheck installation status

Examples

Install hooks
fuku hook --install
Check status
fuku hook --status
Uninstall hooks
fuku hook --uninstall

What It Does

  • Detect command failures automatically
  • Capture error context (command, output, environment)
  • Send data to daemon for processing
  • Display relevant solutions from your knowledge base

Common Workflows

Quick Start

1. Initialize repository

cd ~/projects/myapp
fuku init

2. Add a note

fuku add --title "Initial setup notes"

3. Search notes

fuku search "setup"

4. View note in browser

fuku open @latest

Automatic Error Capture

The daemon captures errors automatically

cd ~/projects/myapp
fuku init  # Enables daemon by default

Run commands normally - errors are auto-captured

npm test
cargo build
docker-compose up

Check captured errors

fuku search "error"
fuku daemon --status

Team Knowledge Sharing

1. Configure remote

fuku config remote --set https://hub.fukura.dev

2. Enable auto-sync

fuku sync --enable-auto

3. Add notes with org privacy

fuku add --title "Deployment guide" --privacy org

4. Sync all team notes

fuku sync --all

5. Pull teammate&apos;s note

fuku pull hub-id-12345

Sensitive Data Protection

Set up redaction rules

fuku config redact \
  --set api_key='sk-[a-zA-Z0-9]{32}' \
  --set password='password=\S+' \
  --set aws_key='AWS[A-Z0-9]{16}' \
  --set token='Bearer\s+[A-Za-z0-9-._~+/]+=*'

Now all notes automatically redact sensitive patterns

fuku add --title "API integration" --file ./script.sh

Quick Tips

Special Note References

@latest - Latest note

@1 - Second most recent note

@2 - Third most recent note

Useful Aliases

alias fn='fuku add --title'

alias fs='fuku search'

alias fv='fuku view @latest'

Need help? Have questions?