aico-ai 1.1.0 → 1.1.2

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.
@@ -0,0 +1,73 @@
1
+ name: Publish Package
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+ workflow_dispatch:
7
+ inputs:
8
+ version:
9
+ description: 'Version to publish (leave empty to use package.json version)'
10
+ required: false
11
+ type: string
12
+
13
+ jobs:
14
+ publish-npm:
15
+ runs-on: ubuntu-latest
16
+ permissions:
17
+ contents: read
18
+ id-token: write
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - uses: actions/setup-node@v4
23
+ with:
24
+ node-version: '18'
25
+ registry-url: 'https://registry.npmjs.org'
26
+
27
+ - name: Install dependencies
28
+ run: npm ci
29
+
30
+ - name: Publish to npm
31
+ run: npm publish --provenance --access public
32
+ env:
33
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
34
+
35
+ publish-github-packages:
36
+ runs-on: ubuntu-latest
37
+ permissions:
38
+ contents: read
39
+ packages: write
40
+ steps:
41
+ - uses: actions/checkout@v4
42
+
43
+ - uses: actions/setup-node@v4
44
+ with:
45
+ node-version: '18'
46
+ registry-url: 'https://npm.pkg.github.com'
47
+ scope: '@lukasddesouza'
48
+
49
+ - name: Install dependencies
50
+ run: npm ci
51
+
52
+ - name: Update package name for GitHub Packages
53
+ run: |
54
+ # Create a temporary package.json with scoped name for GitHub Packages
55
+ node -e "
56
+ const fs = require('fs');
57
+ const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
58
+ pkg.name = '@lukasddesouza/aico-ai';
59
+ pkg.publishConfig = {
60
+ registry: 'https://npm.pkg.github.com',
61
+ access: 'public'
62
+ };
63
+ fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2));
64
+ "
65
+
66
+ - name: Publish to GitHub Packages
67
+ run: npm publish
68
+ env:
69
+ NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70
+
71
+ - name: Restore original package.json
72
+ if: always()
73
+ run: git checkout package.json
@@ -0,0 +1,24 @@
1
+ # GitHub Packages Configuration Template
2
+ #
3
+ # This file shows how to configure npm to authenticate with GitHub Packages.
4
+ # DO NOT commit your actual .npmrc file with tokens to git!
5
+ #
6
+ # Instructions:
7
+ # 1. Copy this file to .npmrc in your project root
8
+ # 2. Replace TOKEN with your GitHub Personal Access Token
9
+ # 3. The .npmrc file is already in .gitignore and won't be committed
10
+ #
11
+ # To create a GitHub Personal Access Token:
12
+ # 1. Go to https://github.com/settings/tokens
13
+ # 2. Click "Generate new token (classic)"
14
+ # 3. Select scopes: read:packages, write:packages
15
+ # 4. Copy the token and replace TOKEN below
16
+
17
+ # GitHub Packages registry for @lukasddesouza scope
18
+ @lukasddesouza:registry=https://npm.pkg.github.com
19
+
20
+ # Authentication token (replace TOKEN with your actual token)
21
+ //npm.pkg.github.com/:_authToken=TOKEN
22
+
23
+ # Optional: Keep using npm registry for other packages
24
+ registry=https://registry.npmjs.org/
@@ -0,0 +1,271 @@
1
+ # GitHub Packages Setup Guide
2
+
3
+ This guide explains how to publish and install the `aico-ai` package from GitHub Packages.
4
+
5
+ ## 📦 Dual Publishing Strategy
6
+
7
+ The `aico-ai` package is published to **two registries**:
8
+
9
+ 1. **npm Registry** (default): `aico-ai`
10
+ 2. **GitHub Packages**: `@lukasddesouza/aico-ai`
11
+
12
+ Both packages are identical in functionality. Choose the registry that best fits your workflow.
13
+
14
+ ---
15
+
16
+ ## 🚀 For Package Maintainers (Publishing)
17
+
18
+ ### Prerequisites
19
+
20
+ 1. **GitHub Personal Access Token** with the following scopes:
21
+ - `write:packages` - To publish packages
22
+ - `read:packages` - To download packages
23
+ - `repo` - To access repository (if private)
24
+
25
+ 2. **npm Token** (for npm publishing)
26
+ - Get from https://www.npmjs.com/settings/YOUR_USERNAME/tokens
27
+
28
+ ### Creating a GitHub Personal Access Token
29
+
30
+ 1. Go to [GitHub Settings → Developer settings → Personal access tokens](https://github.com/settings/tokens)
31
+ 2. Click **"Generate new token (classic)"**
32
+ 3. Give it a descriptive name (e.g., "aico-ai GitHub Packages")
33
+ 4. Select the following scopes:
34
+ - ✅ `write:packages`
35
+ - ✅ `read:packages`
36
+ - ✅ `repo` (if repository is private)
37
+ 5. Click **"Generate token"**
38
+ 6. **Copy the token immediately** (you won't see it again!)
39
+
40
+ ### Setting Up Repository Secrets
41
+
42
+ For automated publishing via GitHub Actions, add these secrets to your repository:
43
+
44
+ 1. Go to your repository on GitHub
45
+ 2. Navigate to **Settings → Secrets and variables → Actions**
46
+ 3. Click **"New repository secret"**
47
+ 4. Add the following secrets:
48
+
49
+ - **Name:** `NPM_TOKEN`
50
+ - **Value:** Your npm authentication token
51
+
52
+ - **Note:** `GITHUB_TOKEN` is automatically provided by GitHub Actions
53
+
54
+ ### Publishing Workflow
55
+
56
+ The package is automatically published when you create a new release:
57
+
58
+ #### Option 1: Automatic Publishing (Recommended)
59
+
60
+ 1. **Update version in package.json:**
61
+ ```bash
62
+ npm version patch # or minor, or major
63
+ ```
64
+
65
+ 2. **Push the version commit and tag:**
66
+ ```bash
67
+ git push && git push --tags
68
+ ```
69
+
70
+ 3. **Create a GitHub Release:**
71
+ - Go to your repository on GitHub
72
+ - Click **"Releases"** → **"Create a new release"**
73
+ - Select the tag you just pushed
74
+ - Add release notes
75
+ - Click **"Publish release"**
76
+
77
+ 4. **GitHub Actions will automatically:**
78
+ - Publish to npm as `aico-ai`
79
+ - Publish to GitHub Packages as `@lukasddesouza/aico-ai`
80
+
81
+ #### Option 2: Manual Publishing
82
+
83
+ **To npm:**
84
+ ```bash
85
+ npm publish
86
+ ```
87
+
88
+ **To GitHub Packages:**
89
+ ```bash
90
+ # 1. Authenticate with GitHub Packages
91
+ npm login --scope=@lukasddesouza --registry=https://npm.pkg.github.com
92
+
93
+ # 2. Temporarily update package.json name
94
+ # Change "name": "aico-ai" to "name": "@lukasddesouza/aico-ai"
95
+
96
+ # 3. Update publishConfig in package.json
97
+ # "publishConfig": {
98
+ # "registry": "https://npm.pkg.github.com"
99
+ # }
100
+
101
+ # 4. Publish
102
+ npm publish
103
+
104
+ # 5. Restore package.json to original state
105
+ git checkout package.json
106
+ ```
107
+
108
+ ---
109
+
110
+ ## 📥 For Package Users (Installing)
111
+
112
+ ### Installing from npm (Default)
113
+
114
+ This is the standard installation method:
115
+
116
+ ```bash
117
+ npm install -g aico-ai
118
+ ```
119
+
120
+ ### Installing from GitHub Packages
121
+
122
+ #### Step 1: Authenticate with GitHub Packages
123
+
124
+ Create a `.npmrc` file in your project root (or use the global `~/.npmrc`):
125
+
126
+ ```bash
127
+ # Copy the template
128
+ cp .npmrc.template .npmrc
129
+ ```
130
+
131
+ Edit `.npmrc` and replace `TOKEN` with your GitHub Personal Access Token:
132
+
133
+ ```
134
+ @lukasddesouza:registry=https://npm.pkg.github.com
135
+ //npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN
136
+ ```
137
+
138
+ **Important:** Never commit `.npmrc` with your token to git! It's already in `.gitignore`.
139
+
140
+ #### Step 2: Install the Package
141
+
142
+ **Global installation:**
143
+ ```bash
144
+ npm install -g @lukasddesouza/aico-ai
145
+ ```
146
+
147
+ **Project installation:**
148
+ ```bash
149
+ npm install --save-dev @lukasddesouza/aico-ai
150
+ ```
151
+
152
+ #### Alternative: Using npm login
153
+
154
+ Instead of creating `.npmrc`, you can authenticate via CLI:
155
+
156
+ ```bash
157
+ npm login --scope=@lukasddesouza --registry=https://npm.pkg.github.com
158
+ ```
159
+
160
+ Then enter:
161
+ - **Username:** Your GitHub username
162
+ - **Password:** Your GitHub Personal Access Token
163
+ - **Email:** Your GitHub email
164
+
165
+ ---
166
+
167
+ ## 🔐 Security Best Practices
168
+
169
+ ### For Maintainers
170
+
171
+ 1. **Never commit tokens to git**
172
+ - `.npmrc` is in `.gitignore`
173
+ - Use GitHub Secrets for CI/CD
174
+
175
+ 2. **Use scoped tokens**
176
+ - Create separate tokens for different purposes
177
+ - Regularly rotate tokens
178
+
179
+ 3. **Enable 2FA**
180
+ - Enable two-factor authentication on both npm and GitHub
181
+
182
+ ### For Users
183
+
184
+ 1. **Protect your tokens**
185
+ - Never share your Personal Access Token
186
+ - Don't commit `.npmrc` with tokens
187
+
188
+ 2. **Use read-only tokens when possible**
189
+ - For installation, you only need `read:packages` scope
190
+
191
+ 3. **Use environment variables in CI/CD**
192
+ ```bash
193
+ echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" > .npmrc
194
+ ```
195
+
196
+ ---
197
+
198
+ ## 🆚 npm vs GitHub Packages: Which Should I Use?
199
+
200
+ ### Use **npm** if:
201
+ - ✅ You want the simplest installation experience
202
+ - ✅ You're installing globally (`npm install -g`)
203
+ - ✅ You don't need GitHub-specific features
204
+ - ✅ You want maximum compatibility
205
+
206
+ ### Use **GitHub Packages** if:
207
+ - ✅ You prefer GitHub-native workflows
208
+ - ✅ You want tighter integration with GitHub repositories
209
+ - ✅ You're already using GitHub for dependency management
210
+ - ✅ You need private packages (with GitHub Teams/Enterprise)
211
+
212
+ ---
213
+
214
+ ## 🐛 Troubleshooting
215
+
216
+ ### "Unable to authenticate" error
217
+
218
+ **Problem:** npm can't authenticate with GitHub Packages
219
+
220
+ **Solution:**
221
+ 1. Verify your token has `read:packages` scope
222
+ 2. Check that `.npmrc` is properly configured
223
+ 3. Ensure the token hasn't expired
224
+
225
+ ```bash
226
+ # Test authentication
227
+ npm whoami --registry=https://npm.pkg.github.com
228
+ ```
229
+
230
+ ### "Package not found" error
231
+
232
+ **Problem:** npm can't find `@lukasddesouza/aico-ai`
233
+
234
+ **Solution:**
235
+ 1. Ensure you're using the scoped name: `@lukasddesouza/aico-ai`
236
+ 2. Check that `.npmrc` has the correct registry mapping
237
+ 3. Verify the package has been published
238
+
239
+ ### "Permission denied" error
240
+
241
+ **Problem:** Can't publish to GitHub Packages
242
+
243
+ **Solution:**
244
+ 1. Verify your token has `write:packages` scope
245
+ 2. Ensure you're the repository owner or have write access
246
+ 3. Check that the package name matches the repository owner
247
+
248
+ ---
249
+
250
+ ## 📚 Additional Resources
251
+
252
+ - [GitHub Packages Documentation](https://docs.github.com/en/packages)
253
+ - [npm Documentation](https://docs.npmjs.com/)
254
+ - [Working with the npm registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)
255
+ - [Managing Personal Access Tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)
256
+
257
+ ---
258
+
259
+ ## 💬 Support
260
+
261
+ If you encounter any issues:
262
+
263
+ - 📧 Email: projetos@codetechsoftware.com.br
264
+ - 🐛 Issues: [GitHub Issues](https://github.com/LukasdeSouza/aico-ai/issues)
265
+ - 💬 Discussions: [GitHub Discussions](https://github.com/LukasdeSouza/aico-ai/discussions)
266
+
267
+ ---
268
+
269
+ ## 📝 License
270
+
271
+ ISC License - see [LICENSE](LICENSE) file for details
package/README.md CHANGED
@@ -52,21 +52,50 @@
52
52
 
53
53
  ## 📦 Installation
54
54
 
55
- ### Global Installation (Recommended)
55
+ Aico AI is available on both **npm** and **GitHub Packages**. Choose the option that works best for you:
56
+
57
+ ### Option 1: Install from npm (Recommended)
58
+
59
+ **Global Installation:**
56
60
  ```bash
57
61
  npm install -g aico-ai
58
62
  ```
59
63
 
60
- ### Project-Specific Installation
64
+ **Project-Specific Installation:**
61
65
  ```bash
62
66
  npm install --save-dev aico-ai
63
67
  ```
64
68
 
69
+ ### Option 2: Install from GitHub Packages
70
+
71
+ **Prerequisites:** You need a GitHub Personal Access Token with `read:packages` scope.
72
+
73
+ 1. **Configure npm to use GitHub Packages:**
74
+ ```bash
75
+ # Create .npmrc in your project or home directory
76
+ echo "@lukasddesouza:registry=https://npm.pkg.github.com" >> .npmrc
77
+ echo "//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN" >> .npmrc
78
+ ```
79
+
80
+ 2. **Install the package:**
81
+ ```bash
82
+ # Global installation
83
+ npm install -g @lukasddesouza/aico-ai
84
+
85
+ # Project installation
86
+ npm install --save-dev @lukasddesouza/aico-ai
87
+ ```
88
+
89
+ 📖 **For detailed GitHub Packages setup instructions, see [GITHUB_PACKAGES.md](./GITHUB_PACKAGES.md)**
90
+
65
91
  ### Verify Installation
66
92
  ```bash
67
93
  aico --version
68
94
  ```
69
95
 
96
+ [![npm version](https://badge.fury.io/js/aico-ai.svg)](https://www.npmjs.com/package/aico-ai)
97
+ [![GitHub Package](https://img.shields.io/badge/GitHub%20Packages-%40lukasddesouza%2Faico--ai-blue)](https://github.com/LukasdeSouza/aico-ai/packages)
98
+
70
99
  ---
71
100
 
72
101
  ## Quick Start
@@ -720,6 +749,7 @@ aico commit
720
749
 
721
750
  ## Documentation
722
751
 
752
+ - **[Official Documentation](https://aico-ai.vercel.app)** - Visit our full documentation website
723
753
  - **[Team Rules Guide](./TEAM_RULES_GUIDE.md)** - Complete guide to configuring team rules
724
754
  - **[CI/CD Integration Guide](./CI_CD_INTEGRATION_GUIDE.md)** - Detailed CI/CD setup instructions
725
755
  - **[Product Roadmap](./PRODUCT_ROADMAP.md)** - Upcoming features and priorities
@@ -727,7 +757,7 @@ aico commit
727
757
 
728
758
  ---
729
759
 
730
- ## 🤝 Contributing
760
+ ## Contributing
731
761
 
732
762
  We welcome contributions! Whether it's:
733
763
 
@@ -745,7 +775,7 @@ We welcome contributions! Whether it's:
745
775
 
746
776
  ---
747
777
 
748
- ## 📊 Supported AI Providers
778
+ ## Supported AI Providers
749
779
 
750
780
  | Provider | Speed | Cost | Privacy | Best For |
751
781
  |----------|-------|------|---------|----------|
@@ -757,7 +787,7 @@ We welcome contributions! Whether it's:
757
787
 
758
788
  ---
759
789
 
760
- ## 🔒 Security & Privacy
790
+ ## Security & Privacy
761
791
 
762
792
  - **API Keys**: Stored locally in `~/.aicorc` (never committed)
763
793
  - **Code Privacy**: Only diffs are sent to AI providers
@@ -787,11 +817,77 @@ ISC License - see [LICENSE](LICENSE) file for details
787
817
  - 🐛 Issues: [GitHub Issues](https://github.com/LukasdeSouza/aico-ai/issues)
788
818
  - 💬 Discussions: [GitHub Discussions](https://github.com/LukasdeSouza/aico-ai/discussions)
789
819
 
820
+ <script type="text/javascript" src="https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js" data-name="bmc-button" data-slug="seekjobs" data-color="#40DCA5" data-emoji="🤖" data-font="Cookie" data-text="Buy me a coffee" data-outline-color="#000000" data-font-color="#ffffff" data-coffee-color="#FFDD00" ></script>
821
+
822
+ ---
823
+
824
+ ## ⭐ Show Your Support
825
+
826
+ If you find Aico AI useful, please consider:
827
+
828
+ - **⭐ Starring the repository** on [GitHub](https://github.com/LukasdeSouza/aico-ai) - It helps others discover the project!
829
+ - **🐛 Reporting bugs** or **💡 suggesting features** via [GitHub Issues](https://github.com/LukasdeSouza/aico-ai/issues)
830
+ - **📢 Sharing** with your team and developer community
831
+ - **🤝 Contributing** - We're open source and welcome contributions!
832
+
833
+ <script type="text/javascript" src="https://cdnjs.buymeacoffee.com/1.0.0/button.prod.min.js" data-name="bmc-button" data-slug="seekjobs" data-color="#40DCA5" data-emoji="🤖" data-font="Cookie" data-text="Buy me a coffee" data-outline-color="#000000" data-font-color="#ffffff" data-coffee-color="#FFDD00" ></script>
834
+
835
+ <div align="center">
836
+
837
+ ### 🌟 Star History
838
+
839
+ [![Star History Chart](https://api.star-history.com/svg?repos=LukasdeSouza/aico-ai&type=Date)](https://star-history.com/#LukasdeSouza/aico-ai&Date)
840
+
841
+ </div>
842
+
843
+ ---
844
+
845
+ ## Contributing
846
+
847
+ We welcome contributions! Whether it's:
848
+
849
+ - 🐛 **Bug Reports**: Found an issue? Let us know!
850
+ - 💡 **Feature Requests**: Have an idea? We'd love to hear it!
851
+ - 📝 **Documentation**: Help improve our docs
852
+ - 🔧 **Code Contributions**: Submit a pull request
853
+
854
+ **Getting Started:**
855
+ 1. Fork the repository
856
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
857
+ 3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
858
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
859
+ 5. Open a Pull Request
860
+
861
+ **Development Setup:**
862
+ ```bash
863
+ # Clone your fork
864
+ git clone https://github.com/YOUR_USERNAME/aico-ai.git
865
+ cd aico-ai
866
+
867
+ # Install dependencies
868
+ npm install
869
+
870
+ # Test locally
871
+ node index.js --help
872
+
873
+ # Make your changes and test
874
+ node index.js review
875
+ ```
876
+
877
+ **Contribution Guidelines:**
878
+ - Follow the existing code style
879
+ - Write clear commit messages (we use [Conventional Commits](https://www.conventionalcommits.org/))
880
+ - Add tests for new features
881
+ - Update documentation as needed
882
+ - Be respectful and constructive
883
+
790
884
  ---
791
885
 
792
886
  <div align="center">
793
887
 
794
- **⭐ Star us on GitHub if you find Aico useful!**
888
+ **⭐ Star us on GitHub 🤝 Contribute 📢 Share**
889
+
890
+ **Made with ❤️ by the open source community**
795
891
 
796
892
  [Report Bug](https://github.com/LukasdeSouza/aico-ai/issues) · [Request Feature](https://github.com/LukasdeSouza/aico-ai/issues) · [Documentation](./TEAM_RULES_GUIDE.md)
797
893
 
@@ -0,0 +1,163 @@
1
+ # GitHub Packages Setup - Quick Start Guide
2
+
3
+ This guide will help you complete the GitHub Packages setup for your `aico-ai` package.
4
+
5
+ ## ✅ What's Already Done
6
+
7
+ All the code and configuration files have been created:
8
+
9
+ - ✅ `package.json` - Updated with publishConfig
10
+ - ✅ `.npmrc.template` - Template for users to authenticate
11
+ - ✅ `.github/workflows/publish.yml` - Automated publishing workflow
12
+ - ✅ `GITHUB_PACKAGES.md` - Complete documentation
13
+ - ✅ `README.md` - Updated with installation instructions
14
+
15
+ ## 🚀 What You Need to Do
16
+
17
+ ### Step 1: Add NPM_TOKEN Secret (Required for npm publishing)
18
+
19
+ 1. **Get your npm token:**
20
+ - Go to https://www.npmjs.com/settings/YOUR_USERNAME/tokens
21
+ - Click "Generate New Token" → "Classic Token"
22
+ - Select "Automation" type
23
+ - Copy the token
24
+
25
+ 2. **Add it to GitHub:**
26
+ - Go to https://github.com/LukasdeSouza/aico-ai/settings/secrets/actions
27
+ - Click "New repository secret"
28
+ - Name: `NPM_TOKEN`
29
+ - Value: Paste your npm token
30
+ - Click "Add secret"
31
+
32
+ ### Step 2: Commit and Push These Changes
33
+
34
+ ```bash
35
+ # Stage all new files
36
+ git add .
37
+
38
+ # Commit the changes
39
+ git commit -m "feat: add GitHub Packages support with dual publishing"
40
+
41
+ # Push to GitHub
42
+ git push origin main
43
+ ```
44
+
45
+ ### Step 3: Test the Publishing Workflow
46
+
47
+ You have three options to test:
48
+
49
+ #### Option A: Create a GitHub Release (Recommended)
50
+
51
+ 1. Go to https://github.com/LukasdeSouza/aico-ai/releases
52
+ 2. Click "Create a new release"
53
+ 3. Click "Choose a tag" and create a new tag (e.g., `v1.1.2`)
54
+ 4. Fill in the release title and description
55
+ 5. Click "Publish release"
56
+ 6. The workflow will automatically run and publish to both registries
57
+
58
+ #### Option B: Manual Workflow Trigger
59
+
60
+ 1. Go to https://github.com/LukasdeSouza/aico-ai/actions
61
+ 2. Click on "Publish Package" workflow
62
+ 3. Click "Run workflow"
63
+ 4. Select the branch and click "Run workflow"
64
+
65
+ #### Option C: Version Bump and Tag
66
+
67
+ ```bash
68
+ # Update version
69
+ npm version patch # or minor, or major
70
+
71
+ # Push with tags
72
+ git push && git push --tags
73
+ ```
74
+
75
+ ### Step 4: Verify the Packages
76
+
77
+ After the workflow completes:
78
+
79
+ 1. **Check npm:**
80
+ - Visit: https://www.npmjs.com/package/aico-ai
81
+ - Should show the new version
82
+
83
+ 2. **Check GitHub Packages:**
84
+ - Visit: https://github.com/LukasdeSouza/aico-ai/packages
85
+ - Should show `@lukasddesouza/aico-ai`
86
+
87
+ ## 📦 How Users Will Install
88
+
89
+ ### From npm (Default)
90
+ ```bash
91
+ npm install -g aico-ai
92
+ ```
93
+
94
+ ### From GitHub Packages
95
+ ```bash
96
+ # 1. Configure authentication
97
+ echo "@lukasddesouza:registry=https://npm.pkg.github.com" >> .npmrc
98
+ echo "//npm.pkg.github.com/:_authToken=GITHUB_TOKEN" >> .npmrc
99
+
100
+ # 2. Install
101
+ npm install -g @lukasddesouza/aico-ai
102
+ ```
103
+
104
+ ## 🔍 Monitoring the Workflow
105
+
106
+ When you trigger a release, you can monitor the workflow:
107
+
108
+ 1. Go to https://github.com/LukasdeSouza/aico-ai/actions
109
+ 2. Click on the latest "Publish Package" run
110
+ 3. Watch the progress of both jobs:
111
+ - `publish-npm` - Publishes to npm
112
+ - `publish-github-packages` - Publishes to GitHub Packages
113
+
114
+ ## 🐛 Troubleshooting
115
+
116
+ ### "Error: Need to provide a token"
117
+ - Make sure you added the `NPM_TOKEN` secret in Step 1
118
+
119
+ ### "Error: 403 Forbidden"
120
+ - Check that your npm token has "Automation" permissions
121
+ - Verify the token hasn't expired
122
+
123
+ ### "Package already exists"
124
+ - Make sure you bumped the version in `package.json`
125
+ - You can't republish the same version
126
+
127
+ ### Workflow doesn't trigger
128
+ - Make sure you pushed the workflow file to the repository
129
+ - Check that you created a release (not just a tag)
130
+
131
+ ## 📚 Additional Resources
132
+
133
+ - Full documentation: [GITHUB_PACKAGES.md](./GITHUB_PACKAGES.md)
134
+ - GitHub Packages docs: https://docs.github.com/en/packages
135
+ - npm publishing docs: https://docs.npmjs.com/cli/v8/commands/npm-publish
136
+
137
+ ## 🎉 Success Indicators
138
+
139
+ You'll know everything is working when:
140
+
141
+ 1. ✅ The GitHub Actions workflow completes successfully
142
+ 2. ✅ Your package appears on npm: https://www.npmjs.com/package/aico-ai
143
+ 3. ✅ Your package appears on GitHub: https://github.com/LukasdeSouza/aico-ai/packages
144
+ 4. ✅ Users can install from both registries
145
+
146
+ ## 💡 Tips
147
+
148
+ - **Always test locally first:** Run `npm pack` to create a tarball and test installation
149
+ - **Use semantic versioning:** Follow semver (major.minor.patch) for version numbers
150
+ - **Write good release notes:** Help users understand what changed
151
+ - **Monitor downloads:** Check npm and GitHub for package statistics
152
+
153
+ ## 🆘 Need Help?
154
+
155
+ If you encounter any issues:
156
+
157
+ 1. Check the workflow logs in GitHub Actions
158
+ 2. Review the [GITHUB_PACKAGES.md](./GITHUB_PACKAGES.md) documentation
159
+ 3. Open an issue if you find a problem with the setup
160
+
161
+ ---
162
+
163
+ **Ready to publish?** Follow Step 1 and Step 2 above, then create your first release! 🚀
package/TODO.md ADDED
@@ -0,0 +1,51 @@
1
+ # GitHub Packages Setup - TODO List
2
+
3
+ ## Progress Tracker
4
+
5
+ - [x] 1. Update package.json with publishConfig
6
+ - [x] 2. Create .npmrc.template for user reference
7
+ - [x] 3. Create GitHub Actions workflow for automated publishing
8
+ - [x] 4. Create GITHUB_PACKAGES.md documentation
9
+ - [x] 5. Update README.md with GitHub Packages installation instructions
10
+ - [ ] 6. Test and verify setup
11
+
12
+ ## Completed Steps
13
+
14
+ ✅ **package.json** - Added publishConfig for npm registry
15
+ ✅ **.npmrc.template** - Created template with GitHub Packages authentication instructions
16
+ ✅ **.github/workflows/publish.yml** - Created automated dual-publishing workflow
17
+ ✅ **GITHUB_PACKAGES.md** - Created comprehensive documentation
18
+ ✅ **README.md** - Added GitHub Packages installation section with badges
19
+
20
+ ## Next Steps (Manual)
21
+
22
+ ### For You to Complete:
23
+
24
+ 1. **Create GitHub Personal Access Token**
25
+ - Go to: https://github.com/settings/tokens
26
+ - Click "Generate new token (classic)"
27
+ - Select scopes: `write:packages`, `read:packages`
28
+ - Copy the token
29
+
30
+ 2. **Add NPM_TOKEN Secret to Repository**
31
+ - Go to: https://github.com/LukasdeSouza/aico-ai/settings/secrets/actions
32
+ - Click "New repository secret"
33
+ - Name: `NPM_TOKEN`
34
+ - Value: Your npm authentication token
35
+ - Click "Add secret"
36
+
37
+ 3. **Test the Publishing Workflow**
38
+ - Option A: Create a new release on GitHub
39
+ - Option B: Manually trigger the workflow from Actions tab
40
+ - Option C: Push a new version tag
41
+
42
+ 4. **Verify Packages**
43
+ - Check npm: https://www.npmjs.com/package/aico-ai
44
+ - Check GitHub Packages: https://github.com/LukasdeSouza/aico-ai/packages
45
+
46
+ ## Notes
47
+ - Dual publishing to npm and GitHub Packages
48
+ - npm: aico-ai (existing)
49
+ - GitHub Packages: @lukasddesouza/aico-ai (new)
50
+ - Workflow uses GITHUB_TOKEN (automatic) for GitHub Packages
51
+ - Workflow uses NPM_TOKEN (secret) for npm publishing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aico-ai",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -41,10 +41,14 @@
41
41
  "type": "git",
42
42
  "url": "git+https://github.com/LukasdeSouza/aico-ai.git"
43
43
  },
44
+ "publishConfig": {
45
+ "registry": "https://registry.npmjs.org/",
46
+ "access": "public"
47
+ },
44
48
  "bugs": {
45
49
  "url": "https://github.com/LukasdeSouza/aico-ai/issues"
46
50
  },
47
- "homepage": "https://github.com/LukasdeSouza/aico-ai#readme",
51
+ "homepage": "https://aico-ai.vercel.app",
48
52
  "dependencies": {
49
53
  "dotenv": "^17.2.3",
50
54
  "enquirer": "^2.4.1",