@portkey-ai/hoot 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +87 -0
- package/LICENSE +22 -0
- package/PACKAGE_PREP_SUMMARY.md +169 -0
- package/PRE_PUBLISH_CHECKLIST.md +162 -0
- package/PUBLISHING.md +174 -0
- package/README.md +277 -0
- package/RELEASE_READY.md +210 -0
- package/TEST_LOCALLY.md +98 -0
- package/bin/hoot.js +166 -0
- package/dist/assets/index-CtOwhZ6s.js +175 -0
- package/dist/assets/index-DoH7MPA9.css +1 -0
- package/dist/index.html +15 -0
- package/index.html +14 -0
- package/mcp-backend-server.js +534 -0
- package/package.json +63 -0
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Contributing to Hoot
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to Hoot! We welcome contributions from the community.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
1. Fork the repository
|
|
8
|
+
2. Clone your fork:
|
|
9
|
+
```bash
|
|
10
|
+
git clone https://github.com/yourusername/hoot.git
|
|
11
|
+
cd hoot
|
|
12
|
+
```
|
|
13
|
+
3. Install dependencies:
|
|
14
|
+
```bash
|
|
15
|
+
npm install
|
|
16
|
+
```
|
|
17
|
+
4. Start the development environment:
|
|
18
|
+
```bash
|
|
19
|
+
npm run dev:full
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Development Workflow
|
|
23
|
+
|
|
24
|
+
1. Create a feature branch:
|
|
25
|
+
```bash
|
|
26
|
+
git checkout -b feature/your-feature-name
|
|
27
|
+
```
|
|
28
|
+
2. Make your changes
|
|
29
|
+
3. Test your changes locally
|
|
30
|
+
4. Commit your changes:
|
|
31
|
+
```bash
|
|
32
|
+
git commit -m "feat: add your feature description"
|
|
33
|
+
```
|
|
34
|
+
5. Push to your fork:
|
|
35
|
+
```bash
|
|
36
|
+
git push origin feature/your-feature-name
|
|
37
|
+
```
|
|
38
|
+
6. Open a Pull Request
|
|
39
|
+
|
|
40
|
+
## Coding Standards
|
|
41
|
+
|
|
42
|
+
- Use TypeScript for all new code
|
|
43
|
+
- Follow the existing code style
|
|
44
|
+
- Add comments for complex logic
|
|
45
|
+
- Keep components small and focused
|
|
46
|
+
- Use meaningful variable and function names
|
|
47
|
+
|
|
48
|
+
## Testing
|
|
49
|
+
|
|
50
|
+
Before submitting a PR:
|
|
51
|
+
- Test all features manually
|
|
52
|
+
- Ensure no TypeScript errors: `npm run build`
|
|
53
|
+
- Check that both backend and frontend work together
|
|
54
|
+
|
|
55
|
+
## Commit Message Format
|
|
56
|
+
|
|
57
|
+
We follow conventional commits:
|
|
58
|
+
- `feat:` - New feature
|
|
59
|
+
- `fix:` - Bug fix
|
|
60
|
+
- `docs:` - Documentation changes
|
|
61
|
+
- `style:` - Code style changes (formatting, etc.)
|
|
62
|
+
- `refactor:` - Code refactoring
|
|
63
|
+
- `perf:` - Performance improvements
|
|
64
|
+
- `test:` - Adding tests
|
|
65
|
+
- `chore:` - Build process or auxiliary tool changes
|
|
66
|
+
|
|
67
|
+
## Areas We Need Help
|
|
68
|
+
|
|
69
|
+
- [ ] Resource testing UI
|
|
70
|
+
- [ ] Prompt testing UI
|
|
71
|
+
- [ ] Keyboard shortcuts
|
|
72
|
+
- [ ] Browser extension for CORS bypass
|
|
73
|
+
- [ ] Additional transports (stdio in Electron)
|
|
74
|
+
- [ ] UI/UX improvements
|
|
75
|
+
- [ ] Documentation improvements
|
|
76
|
+
- [ ] Bug fixes
|
|
77
|
+
|
|
78
|
+
## Questions?
|
|
79
|
+
|
|
80
|
+
Feel free to open an issue for:
|
|
81
|
+
- Bug reports
|
|
82
|
+
- Feature requests
|
|
83
|
+
- Questions about the codebase
|
|
84
|
+
- Discussion about improvements
|
|
85
|
+
|
|
86
|
+
Thank you for contributing! 🦉
|
|
87
|
+
|
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Hoot Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# 📦 Hoot - Open Source Release Preparation Complete
|
|
2
|
+
|
|
3
|
+
## ✅ What's Been Done
|
|
4
|
+
|
|
5
|
+
### 1. **Documentation Organization**
|
|
6
|
+
- ✅ Created `docs/` directory
|
|
7
|
+
- ✅ Moved 24+ documentation files from root to `docs/`
|
|
8
|
+
- ✅ Removed redundant/outdated documentation files
|
|
9
|
+
- ✅ Created comprehensive `docs/README.md` index
|
|
10
|
+
- ✅ Cleaned up duplicate README files (removed HOOT_README.md, SCREECH_README.md)
|
|
11
|
+
|
|
12
|
+
### 2. **Project Structure Cleanup**
|
|
13
|
+
- ✅ Created `tests/` directory and moved test files
|
|
14
|
+
- ✅ Created `examples/` directory for example files
|
|
15
|
+
- ✅ Created `bin/` directory for CLI scripts
|
|
16
|
+
- ✅ Organized root folder - now clean and professional
|
|
17
|
+
|
|
18
|
+
### 3. **NPX Support**
|
|
19
|
+
- ✅ Created `bin/hoot.js` - CLI entry point
|
|
20
|
+
- ✅ Added `bin` field to package.json
|
|
21
|
+
- ✅ Made script executable with proper shebang
|
|
22
|
+
- ✅ Auto-starts both backend and frontend servers
|
|
23
|
+
- ✅ Opens browser automatically
|
|
24
|
+
|
|
25
|
+
### 4. **Package Configuration**
|
|
26
|
+
- ✅ Updated package.json with:
|
|
27
|
+
- `bin` field for CLI support
|
|
28
|
+
- `start` script for easy launching
|
|
29
|
+
- `prepublishOnly` script for auto-build
|
|
30
|
+
- Repository, bugs, and homepage URLs
|
|
31
|
+
- Proper keywords and description
|
|
32
|
+
- Node.js version requirement (>=18.0.0)
|
|
33
|
+
|
|
34
|
+
### 5. **Publishing Preparation**
|
|
35
|
+
- ✅ Created `.npmignore` to exclude dev files
|
|
36
|
+
- ✅ Created `CONTRIBUTING.md` for contributors
|
|
37
|
+
- ✅ Created `LICENSE` file (MIT)
|
|
38
|
+
- ✅ Created `PUBLISHING.md` with npm publishing guide
|
|
39
|
+
- ✅ Updated README.md with npx instructions
|
|
40
|
+
|
|
41
|
+
### 6. **Documentation Cleanup**
|
|
42
|
+
Removed redundant/obsolete files:
|
|
43
|
+
- ❌ HOOT_README.md (duplicate)
|
|
44
|
+
- ❌ SCREECH_README.md (old branding)
|
|
45
|
+
- ❌ CORS.md, CORS_PROXY.md (redundant)
|
|
46
|
+
- ❌ DESIGN.md (superseded by DESIGN_HOOT.md)
|
|
47
|
+
- ❌ STATUS.md, WORKING.md, SUCCESS.md (dev files)
|
|
48
|
+
- ❌ Multiple implementation detail files
|
|
49
|
+
- ❌ UI polish summary files
|
|
50
|
+
|
|
51
|
+
## 🚀 How Users Will Use Hoot
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# One command to rule them all!
|
|
55
|
+
npx -y hoot
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
This will:
|
|
59
|
+
1. Install Hoot (if not already installed)
|
|
60
|
+
2. Start the backend server (port 3002)
|
|
61
|
+
3. Start the frontend dev server (port 5173)
|
|
62
|
+
4. Open the browser automatically
|
|
63
|
+
5. User can start testing MCP servers immediately!
|
|
64
|
+
|
|
65
|
+
## 📁 Final Project Structure
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
hoot/
|
|
69
|
+
├── README.md # Main documentation with npx instructions
|
|
70
|
+
├── CONTRIBUTING.md # Contribution guidelines
|
|
71
|
+
├── LICENSE # MIT license
|
|
72
|
+
├── PUBLISHING.md # npm publishing guide
|
|
73
|
+
├── package.json # Updated with bin field
|
|
74
|
+
├── .npmignore # Excludes dev files from npm
|
|
75
|
+
│
|
|
76
|
+
├── bin/
|
|
77
|
+
│ └── hoot.js # CLI entry point (executable)
|
|
78
|
+
│
|
|
79
|
+
├── src/ # Source code (excluded from npm)
|
|
80
|
+
│ ├── components/
|
|
81
|
+
│ ├── lib/
|
|
82
|
+
│ ├── stores/
|
|
83
|
+
│ └── ...
|
|
84
|
+
│
|
|
85
|
+
├── dist/ # Built assets (included in npm)
|
|
86
|
+
│ ├── index.html
|
|
87
|
+
│ └── assets/
|
|
88
|
+
│
|
|
89
|
+
├── docs/ # Documentation (excluded from npm)
|
|
90
|
+
│ ├── README.md # Documentation index
|
|
91
|
+
│ ├── ARCHITECTURE.md
|
|
92
|
+
│ ├── AUTHENTICATION.md
|
|
93
|
+
│ ├── BACKEND_ARCHITECTURE.md
|
|
94
|
+
│ └── ... (9 more docs)
|
|
95
|
+
│
|
|
96
|
+
├── tests/ # Test files (excluded from npm)
|
|
97
|
+
│ └── ... (4 test files)
|
|
98
|
+
│
|
|
99
|
+
├── examples/ # Examples (excluded from npm)
|
|
100
|
+
│ └── mock-webpage.html
|
|
101
|
+
│
|
|
102
|
+
├── mcp-backend-server.js # Backend server (included in npm)
|
|
103
|
+
└── proxy-server.js # Optional proxy (included in npm)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## 📋 Next Steps for Publishing
|
|
107
|
+
|
|
108
|
+
1. **Update Repository URLs** in `package.json`:
|
|
109
|
+
- Change `yourusername` to your actual GitHub username
|
|
110
|
+
|
|
111
|
+
2. **Build the Project**:
|
|
112
|
+
```bash
|
|
113
|
+
npm run build
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
3. **Test Locally**:
|
|
117
|
+
```bash
|
|
118
|
+
npm pack
|
|
119
|
+
npm install -g ./hoot-0.2.0.tgz
|
|
120
|
+
hoot
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
4. **Publish to npm**:
|
|
124
|
+
```bash
|
|
125
|
+
npm login
|
|
126
|
+
npm publish
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
5. **Verify**:
|
|
130
|
+
```bash
|
|
131
|
+
npx -y hoot
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## 🎯 What's Ready
|
|
135
|
+
|
|
136
|
+
- ✅ Clean, organized repository structure
|
|
137
|
+
- ✅ Professional documentation
|
|
138
|
+
- ✅ npx support configured
|
|
139
|
+
- ✅ CLI entry point ready
|
|
140
|
+
- ✅ Publishing workflow documented
|
|
141
|
+
- ✅ Contributing guidelines in place
|
|
142
|
+
- ✅ License file included
|
|
143
|
+
- ✅ .npmignore excludes dev files
|
|
144
|
+
|
|
145
|
+
## 📚 Documentation Available
|
|
146
|
+
|
|
147
|
+
### Root Level:
|
|
148
|
+
- `README.md` - Main README with quick start
|
|
149
|
+
- `CONTRIBUTING.md` - How to contribute
|
|
150
|
+
- `LICENSE` - MIT license
|
|
151
|
+
- `PUBLISHING.md` - How to publish to npm
|
|
152
|
+
|
|
153
|
+
### docs/ Directory:
|
|
154
|
+
- Architecture and design docs
|
|
155
|
+
- Authentication guides
|
|
156
|
+
- Troubleshooting
|
|
157
|
+
- Examples
|
|
158
|
+
- Changelog
|
|
159
|
+
- Roadmap
|
|
160
|
+
|
|
161
|
+
## 🎉 Ready to Ship!
|
|
162
|
+
|
|
163
|
+
The project is now ready for open-source release. Users can start using it with just:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
npx -y hoot
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
No installation, no setup, no configuration needed!
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# 🚀 Pre-Publish Checklist
|
|
2
|
+
|
|
3
|
+
Before publishing Hoot to npm, complete these steps:
|
|
4
|
+
|
|
5
|
+
## 1. Update Repository Information
|
|
6
|
+
|
|
7
|
+
Edit `package.json` and replace `yourusername` with your actual GitHub username:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/YOUR_GITHUB_USERNAME/hoot.git"
|
|
14
|
+
},
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/YOUR_GITHUB_USERNAME/hoot/issues"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/YOUR_GITHUB_USERNAME/hoot#readme"
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 2. Create GitHub Repository
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# If not already a git repository
|
|
26
|
+
git init
|
|
27
|
+
|
|
28
|
+
# Add remote
|
|
29
|
+
git remote add origin https://github.com/YOUR_GITHUB_USERNAME/hoot.git
|
|
30
|
+
|
|
31
|
+
# Add all files
|
|
32
|
+
git add .
|
|
33
|
+
|
|
34
|
+
# Commit
|
|
35
|
+
git commit -m "Initial commit - Hoot v0.2.0"
|
|
36
|
+
|
|
37
|
+
# Push to GitHub
|
|
38
|
+
git push -u origin main
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 3. Test Locally
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Test the start command
|
|
45
|
+
npm start
|
|
46
|
+
|
|
47
|
+
# Should start backend + frontend + open browser
|
|
48
|
+
# Test adding a server and executing a tool
|
|
49
|
+
# Press Ctrl+C when done
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
See `TEST_LOCALLY.md` for detailed testing instructions.
|
|
53
|
+
|
|
54
|
+
## 4. Build for Production
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npm run build
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This creates optimized production assets in `dist/`.
|
|
61
|
+
|
|
62
|
+
## 5. Test the Package
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Create a test package
|
|
66
|
+
npm pack
|
|
67
|
+
|
|
68
|
+
# Install globally from tarball
|
|
69
|
+
npm install -g ./hoot-0.2.0.tgz
|
|
70
|
+
|
|
71
|
+
# Test it
|
|
72
|
+
hoot
|
|
73
|
+
|
|
74
|
+
# Should work just like npm start
|
|
75
|
+
|
|
76
|
+
# Clean up
|
|
77
|
+
npm uninstall -g hoot
|
|
78
|
+
rm hoot-0.2.0.tgz
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 6. Check Package Contents
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# See what will be included in the npm package
|
|
85
|
+
npm pack --dry-run
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Should include:
|
|
89
|
+
- `bin/`
|
|
90
|
+
- `dist/`
|
|
91
|
+
- `mcp-backend-server.js`
|
|
92
|
+
- `package.json`
|
|
93
|
+
- `README.md`
|
|
94
|
+
- `LICENSE`
|
|
95
|
+
|
|
96
|
+
Should NOT include:
|
|
97
|
+
- `src/`
|
|
98
|
+
- `docs/`
|
|
99
|
+
- `tests/`
|
|
100
|
+
- `examples/`
|
|
101
|
+
- `node_modules/`
|
|
102
|
+
|
|
103
|
+
## 7. Login to npm
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
npm login
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Enter your npm credentials.
|
|
110
|
+
|
|
111
|
+
## 8. Publish
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npm publish
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
If you want to use a scoped package (recommended if "hoot" is taken):
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Update package.json name to "@yourusername/hoot"
|
|
121
|
+
npm publish --access public
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## 9. Verify Published Package
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Test with npx
|
|
128
|
+
npx -y hoot
|
|
129
|
+
|
|
130
|
+
# Or install globally
|
|
131
|
+
npm install -g hoot
|
|
132
|
+
hoot
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## 10. Create GitHub Release
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Tag the version
|
|
139
|
+
git tag v0.2.0
|
|
140
|
+
|
|
141
|
+
# Push tag
|
|
142
|
+
git push origin v0.2.0
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Then create a release on GitHub with the changelog.
|
|
146
|
+
|
|
147
|
+
## ✅ Done!
|
|
148
|
+
|
|
149
|
+
Your package is now live on npm! Users can run:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
npx -y hoot
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Need Help?
|
|
158
|
+
|
|
159
|
+
- See `PUBLISHING.md` for detailed publishing guide
|
|
160
|
+
- See `TEST_LOCALLY.md` for testing instructions
|
|
161
|
+
- Check `CONTRIBUTING.md` for development workflow
|
|
162
|
+
|
package/PUBLISHING.md
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Publishing Hoot to npm
|
|
2
|
+
|
|
3
|
+
This guide will help you publish Hoot to npm so users can run it with `npx -y hoot`.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
1. **npm account**: Create one at https://www.npmjs.com/signup
|
|
8
|
+
2. **npm CLI logged in**: Run `npm login` and enter your credentials
|
|
9
|
+
3. **Package built**: Run `npm run build` to create the production build
|
|
10
|
+
|
|
11
|
+
## Pre-publish Checklist
|
|
12
|
+
|
|
13
|
+
- [ ] Update version in `package.json` (follow semver)
|
|
14
|
+
- [ ] Update `CHANGELOG.md` with latest changes
|
|
15
|
+
- [ ] Ensure all tests pass locally
|
|
16
|
+
- [ ] Check that `npm run build` completes without errors
|
|
17
|
+
- [ ] Update repository URL in `package.json` to your actual GitHub repo
|
|
18
|
+
- [ ] Review `.npmignore` to ensure only necessary files are included
|
|
19
|
+
|
|
20
|
+
## Publishing Steps
|
|
21
|
+
|
|
22
|
+
### 1. Update Package Information
|
|
23
|
+
|
|
24
|
+
Edit `package.json` and update these fields:
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/YOUR_USERNAME/hoot.git"
|
|
30
|
+
},
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/YOUR_USERNAME/hoot/issues"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/YOUR_USERNAME/hoot#readme"
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 2. Build for Production
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm run build
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This will:
|
|
45
|
+
- Compile TypeScript
|
|
46
|
+
- Build the Vite frontend
|
|
47
|
+
- Create optimized production assets in `dist/`
|
|
48
|
+
|
|
49
|
+
### 3. Test the Package Locally
|
|
50
|
+
|
|
51
|
+
Before publishing, test the package locally:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Create a tarball
|
|
55
|
+
npm pack
|
|
56
|
+
|
|
57
|
+
# Test installation from tarball
|
|
58
|
+
npm install -g ./hoot-0.2.0.tgz
|
|
59
|
+
|
|
60
|
+
# Test running it
|
|
61
|
+
hoot
|
|
62
|
+
|
|
63
|
+
# Clean up
|
|
64
|
+
npm uninstall -g hoot
|
|
65
|
+
rm hoot-0.2.0.tgz
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 4. Publish to npm
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# First time publishing
|
|
72
|
+
npm publish
|
|
73
|
+
|
|
74
|
+
# If the package name is already taken, use a scope
|
|
75
|
+
npm publish --access public
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 5. Verify the Package
|
|
79
|
+
|
|
80
|
+
After publishing:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Test with npx
|
|
84
|
+
npx -y hoot
|
|
85
|
+
|
|
86
|
+
# Or install globally and run
|
|
87
|
+
npm install -g hoot
|
|
88
|
+
hoot
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Post-publish Steps
|
|
92
|
+
|
|
93
|
+
1. **Create a GitHub Release**
|
|
94
|
+
- Tag the version: `git tag v0.2.0`
|
|
95
|
+
- Push the tag: `git push origin v0.2.0`
|
|
96
|
+
- Create release on GitHub with changelog
|
|
97
|
+
|
|
98
|
+
2. **Update Documentation**
|
|
99
|
+
- Add installation instructions to README
|
|
100
|
+
- Update examples with the published package name
|
|
101
|
+
|
|
102
|
+
3. **Announce**
|
|
103
|
+
- Share on social media
|
|
104
|
+
- Post in relevant communities
|
|
105
|
+
- Update any related documentation
|
|
106
|
+
|
|
107
|
+
## Updating the Package
|
|
108
|
+
|
|
109
|
+
When you need to publish a new version:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Update version (choose one)
|
|
113
|
+
npm version patch # 0.2.0 -> 0.2.1
|
|
114
|
+
npm version minor # 0.2.0 -> 0.3.0
|
|
115
|
+
npm version major # 0.2.0 -> 1.0.0
|
|
116
|
+
|
|
117
|
+
# This will automatically:
|
|
118
|
+
# - Update package.json
|
|
119
|
+
# - Create a git commit
|
|
120
|
+
# - Create a git tag
|
|
121
|
+
|
|
122
|
+
# Build and publish
|
|
123
|
+
npm run build
|
|
124
|
+
npm publish
|
|
125
|
+
|
|
126
|
+
# Push to git
|
|
127
|
+
git push origin main --tags
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Files Included in npm Package
|
|
131
|
+
|
|
132
|
+
The following files are included (see `.npmignore`):
|
|
133
|
+
- `bin/` - CLI scripts
|
|
134
|
+
- `dist/` - Built frontend assets
|
|
135
|
+
- `mcp-backend-server.js` - Backend server
|
|
136
|
+
- `package.json` - Package metadata
|
|
137
|
+
- `README.md` - Documentation
|
|
138
|
+
- `LICENSE` - License file
|
|
139
|
+
|
|
140
|
+
The following are excluded:
|
|
141
|
+
- `src/` - Source TypeScript files
|
|
142
|
+
- `docs/` - Documentation files
|
|
143
|
+
- `tests/` - Test files
|
|
144
|
+
- `examples/` - Example files
|
|
145
|
+
- Development configuration files
|
|
146
|
+
|
|
147
|
+
## Troubleshooting
|
|
148
|
+
|
|
149
|
+
### Package name already taken
|
|
150
|
+
Use an npm scope: Change package name to `@yourusername/hoot`
|
|
151
|
+
|
|
152
|
+
### Permission denied
|
|
153
|
+
Run `npm login` again to authenticate
|
|
154
|
+
|
|
155
|
+
### Build fails
|
|
156
|
+
Check that all dependencies are installed: `npm install`
|
|
157
|
+
|
|
158
|
+
### Binary not working
|
|
159
|
+
Ensure `bin/hoot.js` has execute permissions: `chmod +x bin/hoot.js`
|
|
160
|
+
|
|
161
|
+
## Best Practices
|
|
162
|
+
|
|
163
|
+
1. **Semantic Versioning**: Follow semver for version numbers
|
|
164
|
+
2. **Changelog**: Keep CHANGELOG.md up to date
|
|
165
|
+
3. **Testing**: Test locally before publishing
|
|
166
|
+
4. **Git Tags**: Tag releases in git
|
|
167
|
+
5. **Documentation**: Keep README.md accurate and helpful
|
|
168
|
+
|
|
169
|
+
## Support
|
|
170
|
+
|
|
171
|
+
- GitHub Issues: https://github.com/yourusername/hoot/issues
|
|
172
|
+
- npm Package: https://www.npmjs.com/package/hoot
|
|
173
|
+
- Documentation: See `docs/` folder
|
|
174
|
+
|