Firefly III CLI
CLI-Anything 사양을 기반으로 하는 Firefly III 명령줄 인터페이스입니다. MCP 모드를 상태 비저장 CLI 모드로 변환하여 Node.js 잔여 프로세스 문제를 방지합니다.
설치
pip install cli-anything-firefly-iii
필수 조건
- Python 3.10+
- 실행 중인 Firefly III 인스턴스
- 개인 액세스 토큰(PAT)
설정
환경 변수 (권장)
export FIREFLY_III_BASE_URL="https://firefly.yourdomain.com"
export FIREFLY_III_PAT="your-personal-access-token"
명령줄 인수
cli-anything-firefly-iii --base-url https://firefly.yourdomain.com --pat your-token
명령 그룹
| 명령 그룹 | 설명 | 해당 API |
|---|---|---|
accounts | 계정 관리 (CRUD) | /api/v1/accounts |
transactions | 거래 관리 (CRUD) | /api/v1/transactions |
budgets | 예산 관리 (CRUD + 한도) | /api/v1/budgets |
categories | 카테고리 관리 (CRUD) | /api/v1/categories |
tags | 태그 관리 (CRUD) | /api/v1/tags |
bills | 청구서 관리 (CRUD) | /api/v1/bills |
piggy-banks | 저금통 관리 (CRUD + 이벤트) | /api/v1/piggy-banks |
autocomplete | 다양한 엔터티에 대한 자동 완성 | /api/v1/autocomplete/* |
currencies | 통화 관리 (CRUD) | /api/v1/currencies |
recurrences | 반복 거래 관리 (CRUD) | /api/v1/recurrences |
rules | 규칙 관리 (CRUD + 테스트/실행) | /api/v1/rules |
rule-groups | 규칙 그룹 관리 (CRUD + 실행) | /api/v1/rule-groups |
summary | 재정 요약 | /api/v1/summary/* |
webhooks | 웹훅 관리 (CRUD + 트리거) | /api/v1/webhooks |
insights | 인사이트 및 보고서 | /api/v1/insight/* |
search | 검색 | /api/v1/search/* |
export | 데이터 내보내기 | /api/v1/data/export/* |
info | 시스템 정보 | /api/v1/about |
사용 예제
계정 관리
# 모든 계정 나열
cli-anything-firefly-iii --json accounts list
# 자산 계정 나열
cli-anything-firefly-iii --json accounts list --type asset
# 계정 세부 정보 가져오기
cli-anything-firefly-iii --json accounts get --id 123
# 계정 생성
cli-anything-firefly-iii --json accounts create --name "현금" --type asset --currency-code USD
# 계정 업데이트
cli-anything-firefly-iii --json accounts update --id 123 --name "새 이름"
# 계정 삭제
cli-anything-firefly-iii accounts delete --id 123
거래 관리
# 거래 나열
cli-anything-firefly-iii --json transactions list --limit 10
# 날짜 범위로 거래 나열
cli-anything-firefly-iii --json transactions list --start 2024-01-01 --end 2024-01-31
# 거래 생성
cli-anything-firefly-iii --json transactions create \
--description "식료품" \
--amount 50.00 \
--source-account 1 \
--category "식비"
# 거래 업데이트
cli-anything-firefly-iii --json transactions update --id 456 --description "업데이트됨"
# 거래 삭제
cli-anything-firefly-iii transactions delete --id 456
예산 관리
# 예산 나열
cli-anything-firefly-iii --json budgets list
# 예산 세부 정보 가져오기
cli-anything-firefly-iii --json budgets get --id 1
# 예산 생성
cli-anything-firefly-iii --json budgets create --name "월 예산"
# 예산 업데이트
cli-anything-firefly-iii --json budgets update --id 1 --name "새 예산 이름"
# 예산 삭제
cli-anything-firefly-iii budgets delete --id 1
# 예산 한도 나열
cli-anything-firefly-iii --json budgets limits --budget-id 1
# 예산 한도 생성
cli-anything-firefly-iii --json budgets limit-create --budget-id 1 --amount 1000 --start 2024-01-01 --end 2024-01-31
# 예산 한도 업데이트
cli-anything-firefly-iii --json budgets limit-update --id 1 --amount 1500
# 예산 한도 삭제
cli-anything-firefly-iii budgets limit-delete --id 1
카테고리 관리
# 카테고리 나열
cli-anything-firefly-iii --json categories list
# 카테고리 가져오기
cli-anything-firefly-iii --json categories get --id 1
# 카테고리 생성
cli-anything-firefly-iii --json categories create --name "식비"
# 카테고리 업데이트
cli-anything-firefly-iii --json categories update --id 1 --name "식비 및 외식"
# 카테고리 삭제
cli-anything-firefly-iii categories delete --id 1
태그 관리
# 태그 나열
cli-anything-firefly-iii --json tags list
# 태그 가져오기
cli-anything-firefly-iii --json tags get --id "uuid-here"
# 태그 생성
cli-anything-firefly-iii --json tags create --tag "중요"
# 태그 업데이트
cli-anything-firefly-iii --json tags update --id "uuid-here" --tag "중요-업데이트됨"
# 태그 삭제
cli-anything-firefly-iii tags delete --id "uuid-here"
청구서 관리
# 청구서 나열
cli-anything-firefly-iii --json bills list
# 청구서 가져오기
cli-anything-firefly-iii --json bills get --id 1
# 청구서 생성
cli-anything-firefly-iii --json bills create \
--name "넷플릭스" \
--amount-min 15.99 \
--amount-max 15.99 \
--frequency monthly
# 청구서 업데이트
cli-anything-firefly-iii --json bills update --id 1 --amount-min 19.99
# 청구서 삭제
cli-anything-firefly-iii bills delete --id 1
저금통 관리
# 저금통 나열
cli-anything-firefly-iii --json piggy-banks list
# 저금통 가져오기
cli-anything-firefly-iii --json piggy-banks get --id 1
# 저금통 생성
cli-anything-firefly-iii --json piggy-banks create \
--name "휴가 기금" \
--account-id 1 \
--target-amount 5000
# 저금통 업데이트
cli-anything-firefly-iii --json piggy-banks update --id 1 --name "새 이름"
# 저금통 삭제
cli-anything-firefly-iii piggy-banks delete --id 1
# 저금통 이벤트 나열
cli-anything-firefly-iii --json piggy-banks events --id 1
# 저금통에 돈 추가
cli-anything-firefly-iii --json piggy-banks add-money --id 1 --amount 100
자동 완성
# 계정 자동 완성
cli-anything-firefly-iii --json autocomplete accounts --query "은행"
# 카테고리 자동 완성
cli-anything-firefly-iii --json autocomplete categories --query "식비"
# 태그 자동 완성
cli-anything-firefly-iii --json autocomplete tags --query "중요"
# 거래 자동 완성
cli-anything-firefly-iii --json autocomplete transactions --query "식료품"
# 예산 자동 완성
cli-anything-firefly-iii --json autocomplete budgets --query "월별"
# 청구서 자동 완성
cli-anything-firefly-iii --json autocomplete bills --query "넷플릭스"
# 저금통 자동 완성
cli-anything-firefly-iii --json autocomplete piggy-banks --query "휴가"
# 통화 자동 완성
cli-anything-firefly-iii --json autocomplete currencies --query "달러"
# 규칙 자동 완성
cli-anything-firefly-iii --json autocomplete rules --query "자동"
# 규칙 그룹 자동 완성
cli-anything-firefly-iii --json autocomplete rule-groups --query "재정"
# 반복 자동 완성
cli-anything-firefly-iii --json autocomplete recurring --query "임대료"
# 개체 그룹 자동 완성
cli-anything-firefly-iii --json autocomplete object-groups --query "그룹"
# 거래 유형 자동 완성
cli-anything-firefly-iii --json autocomplete transaction-types --query "출금"
통화 관리
# 통화 나열
cli-anything-firefly-iii --json currencies list
# 통화 가져오기
cli-anything-firefly-iii --json currencies get --id 1
# 통화 생성
cli-anything-firefly-iii --json currencies create \
--code "KRW" \
--name "대한민국 원" \
--symbol "₩"
# 통화 업데이트
cli-anything-firefly-iii --json currencies update --id 1 --symbol "원"
# 통화 삭제
cli-anything-firefly-iii currencies delete --id 1
# 환율 가져오기
cli-anything-firefly-iii --json currencies exchange-rates --from USD --to EUR
반복 거래 관리
# 반복 거래 나열
cli-anything-firefly-iii --json recurrences list
# 반복 거래 가져오기
cli-anything-firefly-iii --json recurrences get --id 1
# 반복 거래 생성
cli-anything-firefly-iii --json recurrences create \
--title "월세" \
--type withdrawal \
--amount 1500 \
--source-account 1 \
--destination-account 2 \
--frequency monthly
# 반복 거래 업데이트
cli-anything-firefly-iii --json recurrences update --id 1 --amount 1600
# 반복 거래 삭제
cli-anything-firefly-iii recurrences delete --id 1
규칙 관리
# 규칙 나열
cli-anything-firefly-iii --json rules list
# 규칙 가져오기
cli-anything-firefly-iii --json rules get --id 1
# 규칙 생성
cli-anything-firefly-iii --json rules create \
--title "식료품 자동 태그" \
--trigger "description_contains" \
--value "식료품" \
--action set_category \
--action-value "식비"
# 규칙 업데이트
cli-anything-firefly-iii --json rules update --id 1 --title "새 제목"
# 규칙 삭제
cli-anything-firefly-iii rules delete --id 1
# 규칙 테스트
cli-anything-firefly-iii --json rules test --id 1
# 규칙 실행
cli-anything-firefly-iii --json rules execute --id 1
규칙 그룹 관리
# 규칙 그룹 나열
cli-anything-firefly-iii --json rule-groups list
# 규칙 그룹 가져오기
cli-anything-firefly-iii --json rule-groups get --id 1
# 규칙 그룹 생성
cli-anything-firefly-iii --json rule-groups create --title "재정 규칙"
# 규칙 그룹 업데이트
cli-anything-firefly-iii --json rule-groups update --id 1 --title "새 제목"
# 규칙 그룹 삭제
cli-anything-firefly-iii rule-groups delete --id 1
# 규칙 그룹 실행
cli-anything-firefly-iii --json rule-groups execute --id 1
요약 보고서
# 기본 요약 세트
cli-anything-firefly-iii --json summary default-set --start 2024-01-01 --end 2024-01-31
# 계정 요약
cli-anything-firefly-iii --json summary account-summary --start 2024-01-01 --end 2024-01-31
# 사용 가능한 예산 요약
cli-anything-firefly-iii --json summary available-budget --start 2024-01-01 --end 2024-01-31
# 청구서 요약
cli-anything-firefly-iii --json summary bill-summary --start 2024-01-01 --end 2024-01-31
# 예산 요약
cli-anything-firefly-iii --json summary budget-summary --start 2024-01-01 --end 2024-01-31
# 카테고리 요약
cli-anything-firefly-iii --json summary category-summary --start 2024-01-01 --end 2024-01-31
# 태그 요약
cli-anything-firefly-iii --json summary tag-summary --start 2024-01-01 --end 2024-01-31
# 송금 요약
cli-anything-firefly-iii --json summary transfer-summary --start 2024-01-01 --end 2024-01-31
웹훅 관리
# 웹훅 나열
cli-anything-firefly-iii --json webhooks list
# 웹훅 가져오기
cli-anything-firefly-iii --json webhooks get --id 1
# 웹훅 생성
cli-anything-firefly-iii --json webhooks create \
--title "내 웹훅" \
--trigger create \
--url "https://example.com/webhook" \
--secret "my-secret"
# 웹훅 업데이트
cli-anything-firefly-iii --json webhooks update --id 1 --title "새 제목"
# 웹훅 삭제
cli-anything-firefly-iii webhooks delete --id 1
# 웹훅 수동 트리거
cli-anything-firefly-iii --json webhooks trigger --id 1
인사이트 및 보고서
# 지출 보고서 (카테고리별)
cli-anything-firefly-iii --json insights expense \
--start 2024-01-01 \
--end 2024-01-31 \
--group-by category
# 수입 보고서
cli-anything-firefly-iii --json insights income \
--start 2024-01-01 \
--end 2024-01-31
# 송금 인사이트
cli-anything-firefly-iii --json insights transfer \
--start 2024-01-01 \
--end 2024-01-31
# 계정 개요
cli-anything-firefly-iii --json insights overview \
--start 2024-01-01 \
--end 2024-01-31
검색
# 거래 검색
cli-anything-firefly-iii --json search transactions --query "식료품"
데이터 내보내기
# 거래 내보내기
cli-anything-firefly-iii --json export transactions \
--start 2024-01-01 \
--end 2024-01-31
# 계정 내보내기
cli-anything-firefly-iii --json export accounts
# 예산 내보내기
cli-anything-firefly-iii --json export budgets
# 카테고리 내보내기
cli-anything-firefly-iii --json export categories
시스템 정보
# 시스템 정보
cli-anything-firefly-iii --json info about
# 연결 상태
cli-anything-firefly-iii info status
사전 설정 필터링
--preset 매개변수를 사용하여 사용 가능한 명령을 필터링합니다:
# 기본 프리셋
cli-anything-firefly-iii --preset default accounts list
# 전체 프리셋
cli-anything-firefly-iii --preset full accounts list
# 예산 프리셋
cli-anything-firefly-iii --preset budget budgets list
# 보고 프리셋
cli-anything-firefly-iii --preset reporting insights expense --start 2024-01-01 --end 2024-01-31
사용 가능한 프리셋:
default: 핵심 기능 (계정, 거래, 카테고리, 태그, 청구서, 검색)full: 모든 기능basic: 기본 기능 (계정, 거래, 카테고리, 태그, 검색)budget: 예산 관련 (계정, 예산, 거래, 요약, 인사이트)reporting: 보고 관련 (계정, 거래, 카테고리, 인사이트, 요약, 검색)admin: 관리자 기능 (정보, 설정, 통화, 사용자, 환경설정)automation: 자동화 (규칙, 반복, 웹훅, 거래)
에이전트 가이드라인
기본 사용법
- 구조화된 출력에
--json사용: 모든 명령은--json플래그를 지원하며 JSON 형식 데이터를 반환합니다. - 먼저
info status를 호출하여 연결 확인: 작업을 실행하기 전에 Firefly III 연결이 정상인지 확인합니다. - 프리셋을 사용하여 명령 수 줄이기:
--preset을 통해 불필요한 명령을 필터링합니다.
일반적인 워크플로
계정 잔액 확인
# 1. 연결 확인
cli-anything-firefly-iii info status
# 2. 자산 계정 나열
cli-anything-firefly-iii --json accounts list --type asset
# 3. 계정 세부 정보 확인 (잔액 보기)
cli-anything-firefly-iii --json accounts get --id <account_id>
지출 기록
# 1. 지출 계정 찾기
cli-anything-firefly-iii --json accounts list --type expense
# 2. 거래 생성
cli-anything-firefly-iii --json transactions create \
--description "식료품" \
--amount 50.00 \
--source-account 1 \
--destination-account 2 \
--category "식비" \
--date 2024-01-15
예산 검토
# 1. 예산 나열
cli-anything-firefly-iii --json budgets list
# 2. 예산 한도 확인
cli-anything-firefly-iii --json budgets limits --budget-id 1
# 3. 예산 요약 보기
cli-anything-firefly-iii --json summary budget-summary --start 2024-01-01 --end 2024-01-31
청구서 확인
# 1. 모든 청구서 나열
cli-anything-firefly-iii --json bills list
# 2. 특정 청구서 세부 정보 보기
cli-anything-firefly-iii --json bills get --id 1
자동화 규칙 관리
# 1. 규칙 나열
cli-anything-firefly-iii --json rules list
# 2. 새 자동화 규칙 생성
cli-anything-firefly-iii --json rules create \
--title "대형 거래 태그" \
--trigger "amount_more" \
--value "1000" \
--action set_tag \
--action-value "대형"
# 3. 규칙 테스트
cli-anything-firefly-iii --json rules test --id 1
# 4. 규칙 실행
cli-anything-firefly-iii --json rules execute --id 1
문제 해결
일반적인 문제
| 문제 | 해결 방법 |
|---|---|
Node residual process 오류 | --no-mcp 플래그를 사용하거나 MCP 없이 직접 CLI를 실행하십시오. |
| 인증 오류 | FIREFLY_III_BASE_URL 및 FIREFLY_III_PAT 환경 변수가 올바르게 설정되었는지 확인하십시오. |
| 연결 시간 초과 | Firefly III 인스턴스가 실행 중이고 네트워크에서 접근 가능한지 확인하십시오. |
| 지원되지 않는 명령 | Firefly III 인스턴스가 필요한 모든 API 엔드포인트를 지원하는지 확인하십시오. |
디버깅
자세한 출력을 위해 --debug 플래그를 사용하십시오:
cli-anything-firefly-iii --debug accounts list
라이선스
MIT