-
Notifications
You must be signed in to change notification settings - Fork 0
getting started Quick Start
Get up and running with COPIMA CLI Crawler in just a few minutes.
Before you begin, ensure you have:
- Node.js 20+ or Bun 1.2.8+ installed
- Access to a GitLab instance (gitlab.com or self-hosted)
- Authentication credentials (Personal Access Token or OAuth2)
- Sufficient disk space for the crawled data
If using as a pre-built executable:
# The tool should already be available as 'copima-cli-crawler'
copima-cli-crawler --versionIf building from source:
# Clone the repository
git clone https://github.com/pdiegmann/copima-cli-crawler.git
cd copima-cli-crawler
# Install dependencies
npm install
# Build the project
npm run buildThe easiest way to get started is using the interactive setup wizard:
copima-cli-crawler setupThe wizard will guide you through:
- Setting your GitLab instance URL
- Configuring authentication (OAuth2 or Personal Access Token)
- Setting the output directory
- Other optional settings
Once setup is complete, start your first crawl:
copima-cli-crawler crawlThis will:
- Connect to your GitLab instance
- Crawl all accessible data in 4 steps
- Save everything to the configured output directory
- Display progress in real-time
If you prefer not to use the interactive wizard:
# Create a config file
cat > copima.yaml << 'EOF'
gitlab:
host: "https://gitlab.com"
token: "your-personal-access-token"
output:
rootDir: "./output"
EOF
# Run the crawl
copima-cli-crawler crawl --config ./copima.yaml# Create a config file with OAuth2 settings
cat > copima.yaml << 'EOF'
gitlab:
host: "https://gitlab.com"
output:
rootDir: "./output"
oauth2:
providers:
gitlab:
clientId: "your-client-id"
clientSecret: "your-client-secret"
redirectUri: "http://localhost:3000/callback"
authorizationUrl: "https://gitlab.com/oauth/authorize"
tokenUrl: "https://gitlab.com/oauth/token"
scopes:
- api
- read_api
EOF
# Authenticate (opens browser)
copima-cli-crawler auth --config ./copima.yaml
# Run the crawl
copima-cli-crawler crawl --config ./copima.yamlAfter the crawl completes, you'll find:
output/
├── .copima-registry.json # Deduplication registry
├── progress.yaml # Latest progress state
├── users.jsonl # All users
├── group1/ # Top-level group
│ ├── groups.jsonl # Group metadata
│ ├── members.jsonl # Group members
│ ├── labels.jsonl # Group labels
│ ├── issues.jsonl # Group issues
│ └── project1/ # Nested project
│ ├── projects.jsonl # Project metadata
│ ├── issues.jsonl # Project issues
│ ├── merge_requests.jsonl # Project MRs
│ ├── commits.jsonl # Git commits
│ └── branches.jsonl # Git branches
└── ...
JSONL files can be viewed with:
# View first 5 users
head -5 output/users.jsonl
# Pretty-print with jq
cat output/users.jsonl | head -1 | jq '.'
# Count total users
wc -l output/users.jsonl
# Search for specific data
grep "username" output/users.jsonl# Only crawl groups and projects
copima-cli-crawler crawl --steps areas
# Crawl multiple steps
copima-cli-crawler crawl --steps areas,users# Dry-run mode
copima-cli-crawler crawl --dry-run# If a crawl is interrupted, resume from the last checkpoint
copima-cli-crawler crawl --resume true# Enable debug logging
copima-cli-crawler crawl --verbose trueNow that you have a basic crawl running, explore:
- Command Reference - Learn all available commands
- Configuration Reference - Customize your setup
- Four-Step Process - Understand what's being crawled
- Resume & Recovery - Handle long-running crawls
- Custom Callbacks - Process data as it's crawled
- Ensure the tool is installed and in your PATH
- Try using the full path:
./copima-cli-crawler
- Verify your GitLab token has the correct scopes (api, read_api)
- Check that the GitLab host URL is correct
- Ensure your token hasn't expired
- Check that your GitLab user has access to the resources you're trying to crawl
- Some resources require specific permission levels
- Ensure you have sufficient disk space for the output
- Consider crawling specific steps or groups only
For more help, see the Troubleshooting Guide.
You've now completed the quick start! You should have:
✅ Installed and configured the crawler
✅ Set up authentication
✅ Run your first crawl
✅ Located the output data
Continue to the detailed guides to learn more advanced features.