mirror of
https://github.com/aljazceru/dvmcp.git
synced 2025-12-17 05:14:24 +01:00
- A new command-line option --config-path is added to provide a custom configuration file path.
- The default configuration file path is maintained for backward compatibility. - The usage instructions in the README are updated to include the new option. Now, when you run the CLI with the `--configure` flag, you can specify a path to your configuration file, and the application will use that file for its configuration.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
- [x] Add flag `--config-path` to cli
|
||||
- [ ] Add encryption
|
||||
- [ ] Add payments
|
||||
- [ ] Add mcp inspector
|
||||
|
||||
@@ -19,6 +19,12 @@ cp config.example.yml config.dvmcp.yml
|
||||
nano config.dvmcp.yml
|
||||
```
|
||||
|
||||
You can also specify a custom configuration file path using the `--config-path` flag:
|
||||
|
||||
```bash
|
||||
npx @dvmcp/bridge --config-path /path/to/custom/config.yml
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**Prerequisite:** Ensure you have [Bun](https://bun.sh/) installed.
|
||||
|
||||
@@ -14,7 +14,14 @@ import {
|
||||
import { argv } from 'process';
|
||||
import type { Config } from './src/types';
|
||||
|
||||
const configPath = join(process.cwd(), 'config.dvmcp.yml');
|
||||
const defaultConfigPath = join(process.cwd(), 'config.dvmcp.yml');
|
||||
let configPath = defaultConfigPath;
|
||||
|
||||
const configPathArgIndex = argv.indexOf('--config-path');
|
||||
if (configPathArgIndex !== -1 && argv[configPathArgIndex + 1]) {
|
||||
configPath = argv[configPathArgIndex + 1];
|
||||
console.log(configPath);
|
||||
}
|
||||
|
||||
const configFields: Record<string, FieldConfig> = {
|
||||
nostr: {
|
||||
@@ -113,7 +120,7 @@ const cliMain = async () => {
|
||||
if (argv.includes('--configure')) {
|
||||
await configure();
|
||||
}
|
||||
|
||||
console.log('1', configPath);
|
||||
if (!existsSync(configPath)) {
|
||||
console.log(
|
||||
`${CONFIG_EMOJIS.INFO} No configuration file found. Starting setup...`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@dvmcp/bridge",
|
||||
"version": "0.1.14",
|
||||
"version": "0.1.15",
|
||||
"description": "Bridge connecting MCP servers to Nostr's DVM ecosystem",
|
||||
"module": "index.ts",
|
||||
"type": "module",
|
||||
|
||||
@@ -18,6 +18,12 @@ cp config.example.yml config.dvmcp.yml
|
||||
nano config.dvmcp.yml
|
||||
```
|
||||
|
||||
You can also specify a custom configuration file path using the `--config-path` flag.
|
||||
|
||||
```bash
|
||||
npx @dvmcp/discovery --config-path /path/to/custom/config.dvmcp.yml
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**Prerequisite:** Ensure you have [Bun](https://bun.sh/) installed.
|
||||
|
||||
@@ -12,7 +12,13 @@ import type { Config } from './src/config.js';
|
||||
import { argv } from 'process';
|
||||
import { existsSync } from 'fs';
|
||||
|
||||
const configPath = join(process.cwd(), 'config.dvmcp.yml');
|
||||
const defaultConfigPath = join(process.cwd(), 'config.dvmcp.yml');
|
||||
let configPath = defaultConfigPath;
|
||||
|
||||
const configPathArgIndex = argv.indexOf('--config-path');
|
||||
if (configPathArgIndex !== -1 && argv[configPathArgIndex + 1]) {
|
||||
configPath = argv[configPathArgIndex + 1];
|
||||
}
|
||||
|
||||
const configFields: Record<string, FieldConfig> = {
|
||||
nostr: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@dvmcp/discovery",
|
||||
"version": "0.1.11",
|
||||
"version": "0.1.12",
|
||||
"description": "Discovery service for MCP tools in the Nostr DVM ecosystem",
|
||||
"module": "index.ts",
|
||||
"type": "module",
|
||||
|
||||
Reference in New Issue
Block a user