cli

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2025 License: MIT

README ΒΆ

πŸš€ DocuBook CLI

DocuBook CLI is a Go-based tool that helps you initialize, update, and deploy documentation directly from your terminal.

Coding Panda

πŸ“‹ Table of Contents

πŸ’» System Requirements

  • Go version 1.24 or newer
  • Git (for version control)
  • Internet connection (for downloading dependencies)

πŸ“₯ Installation

  1. Make sure Go is installed on your system:

    go version
    

    Ensure the installed version is 1.24 or newer.

  2. Install DocuBook CLI globally:

    go install github.com/DocuBook/cli/docubook@latest
    

    This will install the binary as docubook in $GOPATH/bin.

  3. Ensure $GOPATH/bin is in your PATH:

    • For Zsh (macOS):
      echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.zshrc
      source ~/.zshrc
      
    • For Bash:
      echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bash_profile
      source ~/.bash_profile
      
  4. Verify the installation was successful:

    docubook --version
    
Method 2: Build from Source
  1. Clone the repository:

    git clone https://github.com/DocuBook/cli.git
    cd cli
    
  2. Install dependencies:

    go mod tidy
    
  3. Build the binary:

    go build -o docubook .
    
  4. (Optional) Move the binary to your system's PATH

βš™οΈ Configuration

Adding to PATH

Make sure $GOPATH/bin is in your PATH. If not, follow the installation steps above.

Verifying Installation

To ensure the installation was successful, run:

docubook --version

You should see a version message.

πŸš€ Usage

  1. Open a terminal and navigate to your project directory
  2. To start a new project, run:
    docubook cli
    
  3. Follow the on-screen instructions to complete project configuration

Complete example:

# Create a new project directory
mkdir my-documentation
cd my-documentation

# Initialize DocuBook project
docubook cli

πŸ”§ Troubleshooting

Command Not Found

If you see command not found: docubook:

  1. Check if Go is installed:

    go version
    
  2. Verify the binary was installed:

    ls -l $(go env GOPATH)/bin/docubook
    
  3. If the file exists but can't be executed, ensure $GOPATH/bin is in your PATH.

Permission Denied

If you encounter a permission error:

chmod +x $(go env GOPATH)/bin/docubook
Update to Latest Version

To update to the latest version of DocuBook CLI, run the following command in your terminal:

go install github.com/DocuBook/cli/docubook@latest

This command will update the docubook binary in your $GOPATH/bin directory.

Uninstalling DocuBook CLI

To uninstall DocuBook CLI:

  1. Remove the binary:

    rm $(go env GOPATH)/bin/docubook
    
  2. (Optional) If you added the export line to your shell configuration, you can remove it:

    • For Zsh (macOS):
      sed -i '' '/export PATH=\$PATH:$(go env GOPATH)\/bin/d' ~/.zshrc
      
    • For Bash:
      sed -i '' '/export PATH=\$PATH:$(go env GOPATH)\/bin/d' ~/.bash_profile
      
  3. Verify the uninstallation:

    which docubook || echo "DocuBook CLI has been successfully uninstalled"
    
Still Having Issues?
  • Check your Go configuration:
    go env
    
  • Look for any error messages during installation
  • Verify you have write permissions to the Go bin directory
  • Ensure $GOPATH is properly configured

Directories ΒΆ

Path Synopsis
version 0.3.0
version 0.3.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL