承接 innobrain/onoffice-cli 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

innobrain/onoffice-cli

Composer 安装命令:

composer require innobrain/onoffice-cli

包简介

Use onOffice from your CLI

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

CLI commands for interacting with onOffice (real estate CRM) from the command line. Designed for AI agent integration with structured JSON output.

Built on top of laravel-onoffice-adapter.

Installation

You can install the package via composer:

composer require innobrain/onoffice-cli

This package requires laravel-onoffice-adapter to be configured with your onOffice API credentials.

You can publish the config file with:

php artisan vendor:publish --tag="onoffice-cli-config"

This is the contents of the published config file:

return [
    'entities' => [
        'estate' => Innobrain\OnOfficeAdapter\Facades\EstateRepository::class,
        'address' => Innobrain\OnOfficeAdapter\Facades\AddressRepository::class,
        // ... more entities
    ],

    'field_modules' => [
        'estate' => 'estate',
        'address' => 'address',
        'activity' => 'agentslog',
        'searchcriteria' => 'searchcriteria',
    ],
];

Usage

Search Records

# Search all estates
php artisan onoffice:search estate --json

# Search with filters
php artisan onoffice:search estate --where="status=1" --where="kaufpreis<500000" --json

# Search with field selection and ordering
php artisan onoffice:search estate --select=Id --select=Ort --select=kaufpreis --orderBy=kaufpreis --limit=10 --json

# Search addresses
php artisan onoffice:search address --where="Ort=Berlin" --json

# Search activities for a specific estate
php artisan onoffice:search activity --where="Objekt_nr=12345" --json

Get Single Record

# Get estate by ID
php artisan onoffice:get estate 12345 --json

# Get address with specific fields
php artisan onoffice:get address 6789 --select=Name --select=Vorname --select=Email --json

List Available Fields

# Get all fields (compact: name and type only)
php artisan onoffice:fields estate --json

# Search fields by name
php artisan onoffice:fields estate --filter=preis --json
php artisan onoffice:fields estate --filter="*flaeche" --json

# Get single field with permitted values
php artisan onoffice:fields estate --field=objekttyp --json

# Get all fields with full details
php artisan onoffice:fields estate --full --json

Fields command options:

  • --filter=pattern - Search by name (substring or wildcard like *preis*)
  • --field=name - Get single field with full details including permitted values
  • --full - Show all field details (length, default, permittedValues)

Supported Entities

estate - Real Estate Listings

Properties/real estate records. Common fields include:

Field Description
Id Estate ID
status Status (1 = active)
objektnr_extern External property number
objekttitel Property title
objekttyp Property type (singleselect)
objektart Property category
kaufpreis Purchase price
warmmiete Warm rent
kaltmiete Cold rent
wohnflaeche Living area (m²)
grundstuecksflaeche Plot area (m²)
anzahl_zimmer Number of rooms
Ort City
Plz Postal code
Strasse Street
land Country
breitengrad, laengengrad Coordinates
verkauft Sold (1) / Rented (1)
reserviert Reserved (1)
veroeffentlichen Published on homepage
geaendert_am Last modified date

Marketing status: Combine verkauft and reserviert fields:

  • verkauft=0, reserviert=0 → Open
  • verkauft=0, reserviert=1 → Reserved
  • verkauft=1 → Sold/Rented

address - Contacts and Addresses

Contact records (clients, owners, prospects). Common fields include:

Field Description
Id Address ID (Datensatznummer)
KdNr Customer number (external)
Anrede Salutation
Vorname First name
Name Last name
Firma Company
Strasse Street
Plz Postal code
Ort City
Land Country
Email Primary email
Telefon1 Primary phone
phone All phone numbers
mobile Mobile numbers
fax Fax numbers
email All email addresses
defaultemail Default email only
imageUrl Profile photo URL
Aenderung Last modified date

Note: Record number (Id) and customer number (KdNr) are different fields. Use Id for API calls.

activity - Agents Log / Activities

Activity records linked to estates and addresses. Common fields include:

Field Description
Nr Activity ID
Objekt_nr Linked estate IDs
Adress_nr Linked address IDs
Aktionsart Kind of action (Email, Telefonat, etc.)
Aktionstyp Type of action (Eingang, Ausgang)
Datum Date/time
created Creation date
Benutzer User name
Benutzer_nr User ID
Bemerkung Comment/notes
Kosten Costs
HerkunftKontakt Contact origin
Beratungsebene Advisory level (A-G)
Absagegrund Reason for cancellation

Advisory levels: A (contract signed) through G (cancellation)

searchcriteria - Search Criteria

Saved property search profiles for contacts. Fields include property preferences (price ranges, locations, property types) linked to addresses.

Other Entities

  • file - File attachments
  • field - Field configuration
  • filter - Saved filters
  • relation - Links between records (buyer, owner, tenant relationships)
  • link - URLs for detail views
  • lastseen - Recently viewed records
  • setting - System settings
  • log - Log entries
  • macro - Text macros
  • marketplace - Marketplace data

Where Clause Operators

Supported operators for --where filters:

Operator Description Example
= Equals --where="status=1"
!= or <> Not equals --where="status!=0"
< Less than --where="kaufpreis<300000"
> Greater than --where="wohnflaeche>80"
<= Less than or equal --where="anzahl_zimmer<=3"
>= Greater than or equal --where="kaufpreis>=100000"
like Pattern match (% wildcard) --where="Ort like %Berlin%"
not like Negative pattern match --where="Name not like %Test%"

Multiple --where clauses are combined with AND logic.

Output Format

With --json flag, output is structured for easy parsing:

{
  "data": [
    {"id": "123", "elements": {"Ort": "Berlin", "kaufpreis": "450000"}}
  ],
  "meta": {
    "total": 42,
    "limit": 10,
    "offset": 0
  }
}

Without --json, output is displayed as a human-readable table.

Development

This is a Laravel package. To run commands locally during development:

# Copy and configure credentials
cp testbench.yaml.dist testbench.yaml
# Edit testbench.yaml with your ON_OFFICE_TOKEN and ON_OFFICE_SECRET

# Run commands via testbench
./vendor/bin/testbench onoffice:search estate --limit=5 --json

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

innobrain/onoffice-cli 适用场景与选型建议

innobrain/onoffice-cli 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 01 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「Innobrain」 「onoffice-cli」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 innobrain/onoffice-cli 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 innobrain/onoffice-cli 我们能提供哪些服务?
定制开发 / 二次开发

基于 innobrain/onoffice-cli 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-15