https://github.com/mxvsh/restflow
Powerful CLI tool for API testing and workflow automation using a simple, human-readable DSL
https://github.com/mxvsh/restflow
Last synced: 2 months ago
JSON representation
Powerful CLI tool for API testing and workflow automation using a simple, human-readable DSL
- Host: GitHub
- URL: https://github.com/mxvsh/restflow
- Owner: mxvsh
- Created: 2025-08-25T18:30:27.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-09-01T13:46:43.000Z (7 months ago)
- Last Synced: 2025-09-01T15:21:29.518Z (7 months ago)
- Language: TypeScript
- Homepage:
- Size: 666 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
Restflow
A powerful CLI tool for API testing and workflow automation using a simple, human-readable DSL.
## 📦 Installation
### Global Install
```bash
npm install -g @restflow/cli
# or
pnpm add -g @restflow/cli
```
### Project Install
```bash
npm install @restflow/cli
# or
pnpm add @restflow/cli
```
## 📝 Example Flow
```bash
### Get Todo
GET https://jsonplaceholder.typicode.com/todos/1
> assert status == 200
> assert body.id == 1
> assert body.title contains "delectus"
### Create Post
POST https://jsonplaceholder.typicode.com/posts
Content-Type: application/json
{
"title": "My New Post",
"body": "This is the content of my post",
"userId": 1
}
> assert status == 201
> assert body.title == "My New Post"
> capture postId = body.id
```
## 🛠️ Development
This project uses Nx monorepo architecture:
```bash
# Install dependencies
pnpm install
# Build all packages
pnpm nx run-many -t build --all
# Run tests
pnpm nx run-many -t test --all
# Build CLI
pnpm nx build cli
```
### 📁 Package Structure
- `@restflow/cli` - Command line interface
- `@restflow/parser` - Flow file parser
- `@restflow/engine` - Flow execution engine
- `@restflow/http` - HTTP client
- `@restflow/variables` - Variable resolution
- `@restflow/environment` - Environment loading
- `@restflow/assertions` - Response validation
- `@restflow/reporter` - Output formatting
- `@restflow/types` - TypeScript definitions
- `@restflow/utils` - Shared utilities
## 💡 Examples
Check out the [examples/basic](./examples/basic) directory for a complete working example with:
- Express.js server with authentication
- Health check flows
- User registration and login flows
- JWT token handling
## 🤝 Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests
5. Submit a pull request
## 📄 License
MIT License - see LICENSE file for details.
---
**Built for API testing and automation**