README
ΒΆ
π DocuBook CLI
DocuBook CLI is a Go-based tool that helps you initialize, update, and deploy documentation directly from your terminal.
π Table of Contents
π» System Requirements
You can use DocuBook CLI with either Go + Node.js or Bun:
- Golang version 1.24 or newer (Download Go)
- Runtime Javascript
- Node.js v18 or newer (Download Node.js)
- Bun v1.0 or newer (Download Bun)
- Git (for version control) (Download Git)
- Internet connection (for downloading dependencies)
π₯ Installation
Method 1: Using Go Install (Recommended)
-
Make sure Go is installed on your system:
go versionEnsure the installed version is 1.24 or newer.
-
Install DocuBook CLI globally:
go install github.com/DocuBook/cli/docubook@latestThis will install the binary as
docubookin$GOPATH/bin. -
Ensure
$GOPATH/binis 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
- For Zsh (macOS):
-
Verify the installation was successful:
docubook --version
Method 2: Build from Source
-
Clone the repository:
git clone https://github.com/DocuBook/cli.git cd cli -
Install dependencies:
go mod tidy -
Build the binary:
go build -o docubook . -
(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
- Open a terminal and navigate to your project directory
- To start a new project, run:
docubook init
π§ Troubleshooting
Command Not Found
If you see command not found: docubook:
-
Check if Go is installed:
go version -
Verify the binary was installed:
ls -l $(go env GOPATH)/bin/docubook -
If the file exists but can't be executed, ensure
$GOPATH/binis 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:
-
Remove the binary:
rm $(go env GOPATH)/bin/docubook -
(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
- For Zsh (macOS):
-
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
$GOPATHis properly configured