nz-legislation
https://github.com/edithatogo/nz-legislation
-
Go to GitHub: https://github.com/new
-
Fill in repository details:
- Repository name:
nz-legislation - Description: "CLI tool for searching and retrieving New Zealand legislation data"
- Visibility: Public (recommended for open source)
- Initialize with:
- ✅ Add a README file (optional, we already have one)
- ❌ Add .gitignore (we already have one)
- ❌ Choose a license (we already have LICENSE)
- Repository name:
-
Click "Create repository"
-
Push existing code:
cd nz-legislation-tool # Initialize git (if not already done) git init # Add your GitHub repository as remote git remote add origin https://github.com/edithatogo/nz-legislation.git # Add all files git add . # Commit git commit -m "feat: Initial release - comprehensive testing complete" # Push to GitHub git branch -M main git push -u origin main
cd nz-legislation-tool
# Create repository
gh repo create nz-legislation --public --description "CLI tool for searching and retrieving New Zealand legislation data" --source=. --remote=origin --pushIf this fails due to network issues, use Option 1 (web interface).
cd nz-legislation-tool
# Initialize git (if not already done)
git init
# Add all files
git add .
# Commit
git commit -m "feat: Initial release - comprehensive testing complete"
# Add remote (replace with your repository URL after creating it on GitHub)
git remote add origin https://github.com/edithatogo/nz-legislation.git
# Rename branch to main
git branch -M main
# Push to GitHub (after creating repository on GitHub)
git push -u origin mainOnce the repository is created, you can add badges to the README:
[](https://github.com/edithatogo/nz-legislation/stargazers)
[](https://github.com/edithatogo/nz-legislation/issues)
[](https://github.com/edithatogo/nz-legislation/blob/main/LICENSE)- Go to your repository on GitHub
- Click on the "Actions" tab
- Click "I understand my workflows, go ahead and enable them"
- CI/CD will run automatically on every push
- Go to Settings → General
- Under "Danger Zone":
- Ensure "Allow merge commits" is enabled
- Consider enabling "Squash merging" for cleaner history
- Under "Features":
- ✅ Enable Issues
- ✅ Enable Projects (optional)
- ✅ Enable Wiki (optional)
- ✅ Enable Discussions (recommended for community)
npm adduserOr visit: https://www.npmjs.com/signup
cd nz-legislation-tool
# Login to npm (if not already logged in)
npm login
# Publish (make sure version is 1.0.0 in package.json)
npm publish --access publicVisit: https://www.npmjs.com/package/nz-legislation
If you can't access GitHub due to network restrictions:
-
Use HTTPS instead of SSH:
git remote add origin https://github.com/edithatogo/nz-legislation.git
-
Try GitHub via mobile hotspot (if institutional network blocks GitHub)
-
Use GitHub Desktop app (sometimes works when CLI doesn't)
-
Create repository via web interface and push later when network allows
If git push fails:
# Check remote URL
git remote -v
# Should show:
# origin https://github.com/edithatogo/nz-legislation.git (fetch)
# origin https://github.com/edithatogo/nz-legislation.git (push)
# If incorrect, update it:
git remote set-url origin https://github.com/edithatogo/nz-legislation.gitIf prompted for credentials:
- Use GitHub Personal Access Token instead of password
- Create token at: https://github.com/settings/tokens
- Use token as password when prompted
Before publishing, ensure:
- Repository created on GitHub
- All files pushed to GitHub
- README displays correctly
- GitHub Actions enabled
- npm account created
- Package published to npm
- GitHub URL in README matches:
https://github.com/edithatogo/nz-legislation
| Item | Value |
|---|---|
| GitHub Username | edithatogo |
| Repository Name | nz-legislation |
| Full GitHub URL | https://github.com/edithatogo/nz-legislation |
| npm Package Name | nz-legislation |
| CLI Command | nzlegislation |
| Install Command | npm install -g nz-legislation |
| npx Command | npx nz-legislation |
Good luck with your repository setup! 🚀