Skip to content

Commit 0afaa25

Browse files
committed
Add READMEs
1 parent a0d5e55 commit 0afaa25

File tree

6 files changed

+335
-3
lines changed

6 files changed

+335
-3
lines changed

CODE_OF_CONDUCT.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official email address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at <[email protected]>.
63+
All complaints will be reviewed and investigated promptly and fairly.
64+
65+
All community leaders are obligated to respect the privacy and security of the
66+
reporter of any incident.
67+
68+
## Enforcement Guidelines
69+
70+
Community leaders will follow these Community Impact Guidelines in determining
71+
the consequences for any action they deem in violation of this Code of Conduct:
72+
73+
### 1. Correction
74+
75+
**Community Impact**: Use of inappropriate language or other behavior deemed
76+
unprofessional or unwelcome in the community.
77+
78+
**Consequence**: A private, written warning from community leaders, providing
79+
clarity around the nature of the violation and an explanation of why the
80+
behavior was inappropriate. A public apology may be requested.
81+
82+
### 2. Warning
83+
84+
**Community Impact**: A violation through a single incident or series of
85+
actions.
86+
87+
**Consequence**: A warning with consequences for continued behavior. No
88+
interaction with the people involved, including unsolicited interaction with
89+
those enforcing the Code of Conduct, for a specified period of time. This
90+
includes avoiding interactions in community spaces as well as external channels
91+
like social media. Violating these terms may lead to a temporary or permanent
92+
ban.
93+
94+
### 3. Temporary Ban
95+
96+
**Community Impact**: A serious violation of community standards, including
97+
sustained inappropriate behavior.
98+
99+
**Consequence**: A temporary ban from any sort of interaction or public
100+
communication with the community for a specified period of time. No public or
101+
private interaction with the people involved, including unsolicited interaction
102+
with those enforcing the Code of Conduct, is allowed during this period.
103+
Violating these terms may lead to a permanent ban.
104+
105+
### 4. Permanent Ban
106+
107+
**Community Impact**: Demonstrating a pattern of violation of community
108+
standards, including sustained inappropriate behavior, harassment of an
109+
individual, or aggression toward or disparagement of classes of individuals.
110+
111+
**Consequence**: A permanent ban from any sort of public interaction within the
112+
community.
113+
114+
## Attribution
115+
116+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117+
version 2.1, available at
118+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
119+
120+
Community Impact Guidelines were inspired by
121+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
122+
123+
For answers to common questions about this code of conduct, see the FAQ at
124+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
125+
[https://www.contributor-covenant.org/translations][translations].
126+
127+
[homepage]: https://www.contributor-covenant.org
128+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
129+
[Mozilla CoC]: https://github.com/mozilla/diversity
130+
[FAQ]: https://www.contributor-covenant.org/faq
131+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Contributing to Kernel
2+
3+
First off, thank you for considering contributing to Kernel! It's people like you that make Kernel such a great tool.
4+
5+
## Code of Conduct
6+
7+
By participating in this project, you are expected to uphold our [Code of Conduct](./CODE_OF_CONDUCT.md). Please report unacceptable behavior to <[email protected]>.
8+
9+
## Getting Started
10+
11+
## Development Workflow
12+
13+
1. **Fork the repository**
14+
- Fork the repository on GitHub to your personal account
15+
- Clone your fork locally: `git clone https://github.com/YOUR_USERNAME/kernel-images.git`
16+
- Add upstream remote: `git remote add upstream https://github.com/original/kernel-images.git`
17+
18+
2. **Create a new branch**
19+
- Always branch from the up-to-date main branch
20+
```bash
21+
git checkout main
22+
git pull upstream main
23+
git checkout -b feature/your-feature-name
24+
```
25+
26+
3. **Make your changes**
27+
- Write your code following our coding standards
28+
- Ensure all tests pass: `npm test`
29+
- Add tests for new functionality
30+
31+
4. **Commit your changes**
32+
- Use clear and meaningful commit messages
33+
- Follow conventional commits format: `type(scope): message`
34+
- Example: `feat(api): add new endpoint for user authentication`
35+
36+
5. **Submit a pull request**
37+
- Push to your fork: `git push origin feature/your-feature-name`
38+
- Create a pull request from your branch to our main branch
39+
- Fill out the PR template completely
40+
41+
## Pull Request Process
42+
43+
1. Update the README.md or documentation with details of changes if applicable
44+
2. The PR requires approval from at least one maintainer
45+
3. You may merge the PR once it has the required number of approvals
46+
47+
## Coding Standards
48+
49+
- **Linting**: We use ESLint to enforce coding standards
50+
```bash
51+
npm run lint
52+
```
53+
- **Formatting**: We use Prettier for code formatting
54+
```bash
55+
npm run format
56+
```
57+
- All PRs must pass our linting and formatting checks to be merged
58+
59+
## Testing
60+
61+
- Write unit tests for all new functionality
62+
- Ensure all tests pass before submitting a PR
63+
- Aim for at least 80% code coverage for new code
64+
65+
## Documentation
66+
67+
- Update documentation for any new or changed functionality
68+
- Document TypeScript interfaces, classes, and methods
69+
- Keep our guides and tutorials up to date
70+
71+
## Reporting Issues
72+
73+
- Use the GitHub issue tracker to report bugs
74+
- Check existing issues before opening a new one
75+
- Fill out the issue template completely
76+
- Include steps to reproduce, expected behavior, and actual behavior
77+
78+
## Licensing
79+
80+
- By contributing to Kernel, you agree that your contributions will be licensed under the project's license
81+
- For questions about licensing, please contact the project maintainers or <[email protected]>
82+
83+
## Communication
84+
85+
- GitHub Issues: Bug reports, feature requests, and discussions
86+
- [Discord](https://discord.gg/FBrveQRcud): For general questions and community discussions
87+
- Email: For security concerns or Code of Conduct violations
88+
89+
## Recognition
90+
91+
Contributors who make significant improvements may be invited to join as project maintainers.
92+
93+
Thank you for contributing to Kernel! ❤️

README.md

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,96 @@
1-
# create-kernel-app
1+
# create-kernel-app
2+
3+
A CLI tool to create the scaffolding for a new Kernel applications. This tool helps you get started with building browser automation applications using Kernel's platform.
4+
5+
## Features
6+
7+
- 🚀 Quick project scaffolding for Kernel applications
8+
- 🔄 Support for multiple programming languages:
9+
- TypeScript
10+
- Python
11+
- 📦 Multiple template options:
12+
- Sample App: A basic template that extracts page titles using Playwright
13+
- Browser Use: A template implementing the Browser Use SDK
14+
- ⚡️ Automatic dependency setup
15+
- 🫶 Interactive CLI with helpful prompts
16+
17+
## Set-Up
18+
19+
```bash
20+
npx @onkernel/create-kernel-app
21+
```
22+
23+
## Usage
24+
25+
Create a new Kernel application by running:
26+
27+
```bash
28+
create-kernel-app [app-name] [options]
29+
```
30+
31+
### Options
32+
33+
- `-l, --language <language>`: Choose your programming language
34+
- TypeScript: `typescript` or `ts`
35+
- Python: `python` or `py`
36+
- `-t, --template <template>`: Select a template
37+
- `sample-app`: Basic template with Playwright integration
38+
- `browser-use`: Template with Browser Use SDK (Python only)
39+
40+
### Examples
41+
42+
Create a TypeScript application with a sample app:
43+
```bash
44+
npx create-kernel-app my-app --language typescript --template sample-app
45+
```
46+
47+
Create a Python application with a sample app:
48+
```bash
49+
npx create-kernel-app my-app --language python --template sample-app
50+
```
51+
52+
Create a Python application with Browser Use template:
53+
```bash
54+
npx create-kernel-app my-app --language python --template browser-use
55+
```
56+
57+
## Next Steps
58+
59+
After creating your application:
60+
61+
1. Navigate to your project directory:
62+
```bash
63+
cd my-app
64+
```
65+
66+
2. Set up your environment:
67+
- For TypeScript: `npm install`
68+
- For Python: `uv venv && source .venv/bin/activate && uv sync`
69+
70+
3. Set your Kernel API key:
71+
```bash
72+
export KERNEL_API_KEY=<YOUR_API_KEY>
73+
```
74+
75+
4. Deploy your application:
76+
```bash
77+
kernel deploy index.ts # for TypeScript
78+
kernel deploy main.py # for Python
79+
```
80+
81+
5. Try out your application using the provided sample commands in the project README.
82+
83+
## Documentation
84+
85+
For more information about Kernel and its features, visit:
86+
- [Kernel Documentation](https://docs.onkernel.com/quickstart)
87+
- [Kernel Homepage](https://onkernel.com)
88+
89+
## Contributing
90+
91+
Contributions are welcome! Please feel free to submit a pull request. See [Contributing](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md)
92+
93+
## License
94+
95+
MIT © [Kernel](https://onkernel.com)
96+

index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ async function setupDependencies(appPath: string, language: LanguageKey): Promis
217217
console.log(` cd ${path.basename(appPath)}`);
218218
console.log(' npm install');
219219
} else if (language === LANGUAGE_PYTHON) {
220-
console.log(chalk.yellow('Please follow the manual setup instructions in the README.'));
220+
console.log(chalk.yellow('\nPlease install dependencies manually:'));
221+
console.log(` cd ${path.basename(appPath)}`);
222+
console.log(' uv venv && source .venv/bin/activate && uv sync');
221223
}
222224
}
223225
}

templates/python/browser-use/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@
22

33
This is a simple Kernel application that implements the Browser Use SDK.
44

5-
See the [docs](https://docs.onkernel.com/quickstart) for information.
5+
To set up your Python environment, run:
6+
7+
```bash
8+
python -m venv venv && source venv/bin/activate && pip install -r requirements.txt
9+
```
10+
11+
See the [docs](https://docs.onkernel.com/build/browser-frameworks) for information.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Kernel Typscript Sample App
2+
3+
This is a simple Kernel application that extracts the title from a webpage.
4+
5+
See the [docs](https://docs.onkernel.com/quickstart) for information.

0 commit comments

Comments
 (0)